Matrix division does not work because of matrix dimensions

9 ビュー (過去 30 日間)
Hadi Ghahremannezhad
Hadi Ghahremannezhad 2019 年 11 月 21 日
コメント済み: Ridwan Alam 2019 年 11 月 21 日
I have two matrices:
A: 5 by 5
B: 5 by 3
How can I claculate matrix division as B divided by A?
I have used:
B / A
B \ A
B ./ A
But all of them show this message:
"Matrix dimensions must agree."

採用された回答

Ridwan Alam
Ridwan Alam 2019 年 11 月 21 日
編集済み: Ridwan Alam 2019 年 11 月 21 日
B\A gives a warning, but not an error.
B\A means inv(B)*A. But your B is not square, so inv(B) won't work.
And, you are not looking for A\B?
  4 件のコメント
Hadi Ghahremannezhad
Hadi Ghahremannezhad 2019 年 11 月 21 日
But there are weird numbers in the result:
41.8515350877193 -1.69864901616146e-17 0.500000000000006
-13.9838450292398 43.6678217821782 0.500000000000000
-13.9838450292398 -1.66902048510060e-17 -43.1678217821782
-13.9838450292398 -43.6678217821782 0.499999999999989
-13.9838450292398 -1.27074865530056e-17 44.1678217821782
Ridwan Alam
Ridwan Alam 2019 年 11 月 21 日
what's your A and B? maybe share the code?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by