From: alfann on
hi,
can anyone help me please about the random values.
I want to select random values between two values.
For example,
I want select any value between 1.50 and 1.01
How can I do that?
From: Sean on
alfann <alfann.net(a)hotmail.com> wrote in message <27519844.10611.1271246996138.JavaMail.root(a)gallium.mathforum.org>...
> hi,
> can anyone help me please about the random values.
> I want to select random values between two values.
> For example,
> I want select any value between 1.50 and 1.01
> How can I do that?

I = rand(10)+1;
I(I<2&I>1.5);
From: alfann on
Thanks for that.
but the method that you gave me is to show all values between the two boundaries.
But
I want select one random value only between the boundaries.
How can I do that please?
From: Steven Lord on

"alfann" <alfann.net(a)hotmail.com> wrote in message
news:61679877.11045.1271251576193.JavaMail.root(a)gallium.mathforum.org...
> Thanks for that.
> but the method that you gave me is to show all values between the two
> boundaries.
> But
> I want select one random value only between the boundaries.
> How can I do that please?

Assuming you want to select from the uniform distribution on your interval,
look at HELP RAND. The first example shows you what you need to do.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: alfann on
Sorry to disturb you
but
all the helps that I got them are noe closed to my question.
I have two terminals:
the maximum value is 1.81
the minimum value is 1.11
X = one value between 1.81 and 1.11

each time I write X, I want to show different value btween 1.81 and 1.11

How can I do it?

Hopefully, now is clear!