alternative ways of taking inverse of matrix?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mudasir Ahmed
el 11 de Mayo de 2016
Respondida: Walter Roberson
el 11 de Mayo de 2016
hi
i want to take inverse of matrix. but some times following error occurs due to determinant zero and my program stops in the middle of the iteration. is there any alternative way of taking inverse which does not effect the simulations and give result zero or any warning but continue the main program. kindly help me :).
Error using mupadmex Error in MuPAD command: Division by zero. [_power] Evaluating: symobj::trysubs
Error in sym/subs>mupadsubs (line 139) G = mupadmex('symobj::fullsubs',F.s,X2,Y2);
Error in sym/subs (line 124) G = mupadsubs(F,X,Y);
2 comentarios
Roger Stafford
el 11 de Mayo de 2016
You need to face the fact that when the determinant of a square matrix is zero, then it has no inverse. Your program cannot in that circumstance continue on as if it were dealing with an inverse, since none can exist. Your program, whatever it is, needs to be able to deal appropriately with that situation.
Stephen23
el 11 de Mayo de 2016
Editada: Stephen23
el 11 de Mayo de 2016
When the determinant of a square matrix is zero then that matrix does not have an inverse:
http://math.stackexchange.com/questions/355644/what-does-it-mean-to-have-a-determinant-equal-to-zero
etc, etc.
Respuesta aceptada
Walter Roberson
el 11 de Mayo de 2016
If you were working numerically then you could use pinv(), which would at least give you something. But you are working symbolically, so unless you can convert that to double, you cannot use pinv(). No, strike that -- you can use pinv() on symbolic arrays. But if you later substitute in symbolic values that lead to division by 0, you will still get an error.
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!