I could not understand the process of dividing two not square matrices....
Mostrar comentarios más antiguos
Hello everyone, hope you are doing well :)
I want to ask a question maybe it's silly but i really need your help :$
when i divide two matrix in matlab like this :
x=[1 2 3;
4 5 6];
y=[1 2 3;
4 5 7];
the result will be
[1 0;-0.7143 1.2]
why ??? what is the process here ?? I tried to divide it by vector but it give me another answer I tried to calculate it in another way by multiply x*inv(y) but i could not because it's not legal to calculate inv for not square matrix.
can anyone help me.
Respuesta aceptada
Más respuestas (1)
the cyclist
el 4 de Ag. de 2013
Editada: the cyclist
el 4 de Ag. de 2013
MATLAB is doing the matrix division, as you suspected, but in this case it is equivalent to using the "pseudoinverse":
>> z = x * pinv(y);
(That's not actually the calculation it does numerically, though.)
See
>> doc slash
and
>> doc pinv
for some details.
Perhaps you wanted element-by-element division? Then,
>> z = x./y
1 comentario
obada
el 4 de Ag. de 2013
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!