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:
vector of random unifromly spaced numbers on a given interval

Subject: vector of random unifromly spaced numbers on a given interval

From: Chelsea

Date: 18 Jan, 2012 19:11:10

Message: 1 of 2

Hello, I have to create a vector of given length that is made up of randomly generated, uniformly spaced numbers from 2 to 9. How would I go about doing this? I can only use one line to do so :/ Please help

Thank you!

Subject: vector of random unifromly spaced numbers on a given interval

From: someone

Date: 18 Jan, 2012 20:23:10

Message: 2 of 2

"Chelsea " <brass4all@gmail.com> wrote in message <jf75ge$o3d$1@newscl01ah.mathworks.com>...
> Hello, I have to create a vector of given length that is made up of randomly generated, uniformly spaced numbers from 2 to 9. How would I go about doing this? I can only use one line to do so :/ Please help
>
> Thank you!

doc rand

% Look at Example 5 in the Examples section.

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