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

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Randsample in matlab 2007

Asked by Cristian on 23 Nov 2012

Hello, I have a question, which is the equivalent of randsample in matlab 2007 ? I am using matlab 2012 now and this works fine, but at the university we have a 2007 license and it is not working.

I am using it like so to take a value from 1 to M. Where M can be any number possible, for example 10 billion.

i=randsample(M,1);

Thank you!

0 Comments

Cristian

Tags

Products

1 Answer

Answer by Azzi Abdelmalek on 23 Nov 2012
Edited by Azzi Abdelmalek on 23 Nov 2012
Accepted answer
 randi(1000000000,1)

1 Comment

Cristian on 23 Nov 2012

Thank you very much.

Azzi Abdelmalek

Contact us