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

random0 to generate a random value in rang [low,high)

Asked by greg on 6 May 2013

Write a function that uses function random0 to generate a random value in the range low, high), where low and high are passed as calling arguments. make random0 a private function called y your new function.

1 Comment

Jan Simon on 6 May 2013

This is a command and not a question. How impolite.

greg

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst on 6 May 2013

Did you see the very first example in the help for the rand() function. It's your answer. Just take that example and put it inside a function called "random0" and you're done. I have no idea what "y" is or how you can have a function called both random0 and y at the same time.

0 Comments

Image Analyst

Contact us