Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



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 (AI) where I is an identity matrix. matrix A's components are 1 at the diagonals and 0 at nondiagonal elements. for example A^30 or A^30 is still have 1 at the diagonals and 0 at nondiagonals. 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



