Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Random number function
Replies: 1   Last Post: Sep 12, 2013 3:07 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,220
Registered: 6/7/07
Random number function
Posted: Sep 11, 2013 7:48 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I tried to create a function to create random numbers and them put them
in a matrix form. its is giving me "Output argument "new" (and maybe
others) not assigned during call to" error. Anyone please help me what
is going on?

function new = Random_generate(j)

...

You said the return value of the function is variable "new" in the
definition line but used 'unifrun' as the variable you assigned the
results to instead...

Change one or the other to be commensurate--either

function unifrun = Random_generate(j)

or

new = [ ... ];

(One or t' other; not both, obviously)

--





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.