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

Thread Subject:
Suppress warning

Subject: Suppress warning

From: lesodk Zokla

Date: 20 May, 2009 13:28:02

Message: 1 of 3

Does anyone know how to suppress this message:

Warning: Matrix is singular, close to singular or badly scaled.
         Results may be inaccurate. RCOND = NaN.

thanks!

Subject: Suppress warning

From: Aurelien Queffurust

Date: 27 May, 2009 12:56:02

Message: 2 of 3

"lesodk Zokla" <lesodk@gmail.com> wrote in message <gv10h2$er7$1@fred.mathworks.com>...
> Does anyone know how to suppress this message:
>
> Warning: Matrix is singular, close to singular or badly scaled.
> Results may be inaccurate. RCOND = NaN.
>
> thanks!

Have a look on this tech-note:
How do I turn off a particular warning in MATLAB?
http://www.mathworks.com/support/solutions/en/data/1-QESD6/

Aur?lien

Subject: Suppress warning

From: Steven Lord

Date: 27 May, 2009 13:32:33

Message: 3 of 3


"Aurelien Queffurust" <tug83@yahoo.fr> wrote in message
news:gvjd92$1qm$1@fred.mathworks.com...
> "lesodk Zokla" <lesodk@gmail.com> wrote in message
> <gv10h2$er7$1@fred.mathworks.com>...
>> Does anyone know how to suppress this message:
>>
>> Warning: Matrix is singular, close to singular or badly scaled.
>> Results may be inaccurate. RCOND = NaN.
>>
>> thanks!
>
> Have a look on this tech-note:
> How do I turn off a particular warning in MATLAB?
> http://www.mathworks.com/support/solutions/en/data/1-QESD6/
>
> Aur?lien

Before turning off the warning, though, you should take a look at what it
says.

This says that the reciprocal condition number of your matrix is NaN.
Generally, to me that indicates that your matrix probably contains at least
one NaN value. Since NaNs tend to propagate, if you suppress this warning
and use this matrix later in your code, you're likely to see NaNs pop up in
places where you don't really want them to be.

Before turning off the warning, LOOK at your matrix and make sure it
contains the data you expect it to, and that if it does contain NaNs that
your code can handle them.

Otherwise I expect your next question to be "My function's returning a
matrix of all NaNs -- why?"

--
Steve Lord
slord@mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us