I could not understand the process of dividing two not square matrices....
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
the cyclist
am 4 Aug. 2013
Bearbeitet: the cyclist
am 4 Aug. 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 Kommentar
obada
am 4 Aug. 2013
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!