The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

Posts: 9,850
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)


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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.