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:
Contradictory Rank

Subject: Contradictory Rank

From: Jeff J

Date: 21 Mar, 2012 02:38:37

Message: 1 of 3

I have a diagonal matrix with values -3.4562e-14, 15.2673, 86.9550, 1.4873e+03. Matlab says that its rank is 3 and rref indicates the same. Why is this, and how can I figure out what's really going on?

Subject: Contradictory Rank

From: Roger Stafford

Date: 21 Mar, 2012 03:17:40

Message: 2 of 3

"Jeff J" wrote in message <jkbevd$cb7$1@newscl01ah.mathworks.com>...
> I have a diagonal matrix with values -3.4562e-14, 15.2673, 86.9550, 1.4873e+03. Matlab says that its rank is 3 and rref indicates the same. Why is this, and how can I figure out what's really going on?
- - - - - - -
  If you check the documentation for the 'rank' function, you will see this: "k = rank(A) returns the number of singular values of A that are larger than the default tolerance, max(size(A))*eps(norm(A))." You would have to enter a smaller 'tol' for the second argument to get a rank of 4. Your smallest singular value is very small.

Roger Stafford

Subject: Contradictory Rank

From: Bruno Luong

Date: 21 Mar, 2012 06:54:25

Message: 3 of 3

"Jeff J" wrote in message <jkbevd$cb7$1@newscl01ah.mathworks.com>...
> I have a diagonal matrix with values -3.4562e-14, 15.2673, 86.9550, 1.4873e+03. Matlab says that its rank is 3 and rref indicates the same. Why is this, and how can I figure out what's really going on?

In addition to Roger said, avoid to use rref() if you want to get a quality code.

Bruno

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