"Iman Behmanesh" wrote in message <firstname.lastname@example.org>... > 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.