May I ask what is the definition of Nilpotent matrix. I suppose that is A^k =0 for some k? If I am right, then 0 must be an eigenvalue of A, then there is some issues for the test problems.
@Ling Liang , take some tolerance while checking the equality of eigen value with zero.
28137 Solvers
Determine if a Given Number is a Triangle Number
322 Solvers
Program an exclusive OR operation with logical operators
640 Solvers
Find nearest prime number less than input number
270 Solvers
2993 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!