1 Replies - 5169 Views - Last Post: 22 July 2008 - 11:06 AM Rate Topic: -----

#1 maxtin11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 22-July 08

check identity matrix

Post icon  Posted 22 July 2008 - 10:22 AM

hi,
i have this topic for my practicals. can anybody help me to write Java program for checking identity matrix?
Is This A Good Question/Topic? 0
  • +

Replies To: check identity matrix

#2 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 252
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: check identity matrix

Posted 22 July 2008 - 11:06 AM

If someone drew several matrices on the whiteboard, would you be able to tell which (if any) of them were and NxN identity matrix? Obviously you would, if they lined up the indices nicely. But, you need to think about how you would do it programatically. Forget Java and just think about the algorithm you would use (in pseudo-code). Go row by row and think about how row N relates to row(N-1) and row(N+1) in an identity matrix. Don't forget about you base case as well (I1).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1