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: -1.#IND00 in matlab
Replies: 13   Last Post: Jan 3, 2013 8:17 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
Re: -1.#IND00 in matlab
Posted: Jan 2, 2013 12:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/2/2013 10:11 AM, majeti dinesh wrote:
> I am obtaining the value -1.#IND0 in computing a value.
> The formula used for the computation is
> r = s + u2*sqrt(u1/(1-u1)) where u2 and u1 are uniform random numbers between [0 1].
> Sometimes the value is -1.#IND0 and sometimes it is not.
> I am unable to understand the reason for this. I would be grateful for any help.

Test the inputs for validity for the operation first or use try...catch
and fixup the error cases or some other way to avoid things like u1==1.

Depending on the value of s other nasty things can happen (particularly
if it could be <0)


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.