Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
random vector

Subject: random vector

From: James

Date: 31 Jan, 2012 00:30:11

Message: 1 of 5

creating a row vector z containing 10 values and each of is a random real number in the
interval [1.6, 3.6].

Subject: random vector

From: James Tursa

Date: 31 Jan, 2012 00:48:09

Message: 2 of 5

"James " <tothe1234@yahoo.com> wrote in message <jg7cmj$r3i$1@newscl01ah.mathworks.com>...
> creating a row vector z containing 10 values and each of is a random real number in the
> interval [1.6, 3.6].

doc rand

See Example 5.

James Tursa

Subject: random vector

From: James

Date: 31 Jan, 2012 00:52:09

Message: 3 of 5

"James Tursa" wrote in message <jg7do9$q6$1@newscl01ah.mathworks.com>...
> "James " <tothe1234@yahoo.com> wrote in message <jg7cmj$r3i$1@newscl01ah.mathworks.com>...
> > creating a row vector z containing 10 values and each of is a random real number in the
> > interval [1.6, 3.6].
>
> doc rand
>
> See Example 5.
>
> James Tursa


where exactly is example 5.

Subject: random vector

From: Roger Stafford

Date: 31 Jan, 2012 01:06:10

Message: 4 of 5

"James " <tothe1234@yahoo.com> wrote in message <jg7cmj$r3i$1@newscl01ah.mathworks.com>...
> creating a row vector z containing 10 values and each of is a random real number in the
> interval [1.6, 3.6].
- - - - - - - - - -
 z = a + (b-a)*rand(1,n);

Roger Stafford

Subject: random vector

From: James

Date: 31 Jan, 2012 01:57:10

Message: 5 of 5

"Roger Stafford" wrote in message <jg7eq1$3e2$1@newscl01ah.mathworks.com>...
> "James " <tothe1234@yahoo.com> wrote in message <jg7cmj$r3i$1@newscl01ah.mathworks.com>...
> > creating a row vector z containing 10 values and each of is a random real number in the
> > interval [1.6, 3.6].
> - - - - - - - - - -
> z = a + (b-a)*rand(1,n);
>
> Roger Stafford

thanks for the reply. so a=1.6; b=3.6; and n=10;

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us