comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » variable value
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: variable value [message #87054 is a reply to message #87053] Tue, 31 December 2013 09:43 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>> When I range a number in gaussian distributions I use: Fo=abs(f+10*(randomn(seed,60))).
>> But now I would to range Fo value between 0.5 and 1, but not as gaussian distribution. How can I do?
>
> f0 = cgScaleVector(RandomU(seed, 60), 0.5, 1.0)

Or, maybe this, depending on what you are looking for:

f0 = RandomU(seed, 60)* 0.5 + 0.5

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Label orientation
Next Topic: closed contour paths: clockwise or anticlockwise - or actually a mixture?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 04:50:22 PDT 2025

Total time taken to generate the page: 1.43967 seconds