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: creating actual eye(N)
Replies: 4   Last Post: Mar 28, 2013 10:41 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
James Tursa

Posts: 2,326
Registered: 8/5/09
Re: creating actual eye(N)
Posted: Mar 27, 2013 11:41 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Iman Behmanesh" wrote in message <kj0b8m$gsi$>...
> 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

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.