Got Questions? Get Answers.
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:
Alternative solution for NAN problem

Subject: Alternative solution for NAN problem

From: Carl S.

Date: 27 Feb, 2013 09:00:08

Message: 1 of 1

The following code gives NAN
[U,D]=eig(N);

To solve this problem, I wrote that
while(det(N) == 0)
     N=(1e-10.*randi(1,size(N)))*eye(size(N));
end

But, the loop does not stop :( Are there any alternative solution instead of this loop to solve the NAN problem ?

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