Search All of the Math Forum:

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

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

Topic: creating actual eye(N)
Replies: 4   Last Post: Mar 28, 2013 10:41 AM

 Messages: [ Previous | Next ]
 James Tursa Posts: 2,326 Registered: 8/5/09
Re: creating actual eye(N)
Posted: Mar 27, 2013 11:41 PM

"Iman Behmanesh" wrote in message <kj0b8m\$gsi\$1@newscl01ah.mathworks.com>...
> I have a matrix, matrix A, and want to optimize some of its components. The residuals are each index (A-I) where I is an identity matrix. matrix A's components are 1 at the diagonals and 0 at non-diagonal elements. for example A^30 or A^-30 is still have 1 at the diagonals and 0 at non-diagonals. However when I subtract A from I, the results is not all zeros as I expect it to be! they are around 10^-15 to 10^-16. I can't use int16(eye(N)) because I can't subtract it later from A. Does anyone know how I can creat an Identity matrix that has zero/1 elements up to the power of -30?!

Can you post an explicit example? Not really sure what you are asking. It sounds like simple floating point arithmetic errors from your description.

James Tursa

Date Subject Author
3/27/13 James Tursa
3/28/13 James Tursa
3/28/13 Steven Lord