4x5 Matrix solution C=B/A receiving four solutions

I have inputted this matrix:
A = [1 8 9 2
2 7 8 3
3 5 7 4
4 1 6 5];
or
A = [1 8 9 2;2 7 8 3;3 5 7 4;4 1 6 5];
with:
B = [11;12;13;14];
C = B/A
error code:
??? 4x5 Matrix | Error: Missing MATLAB operator.

回答 (3 件)

Roger Stafford
Roger Stafford 2013 年 6 月 24 日
編集済み: Roger Stafford 2013 年 6 月 24 日

0 投票

The error message is certainly misleading. The problem is that if A is 4-by-4 and B is 4-by-1, the expression C = B/A is invalid. You are asking that matrix C satisfy the equation
C*A = B
but whatever C is, C*A must have four columns and yet B has only one column, so it is an impossible request.
Philosophaie
Philosophaie 2013 年 6 月 24 日
編集済み: Philosophaie 2013 年 6 月 24 日

0 投票

I am having a syntax error in the 4x4 array "A".
What am I entering wrong?

2 件のコメント

Roger Stafford
Roger Stafford 2013 年 6 月 24 日
編集済み: Roger Stafford 2013 年 6 月 24 日
My version of matlab doesn't complain, but yours might object to what appears in this text to be a blank line between the first line and the rest of the A matrix input. Or perhaps it wants semicolons after each row. I still don't understand that error message. It is as though you had a fifth number entered in the first line.
My comment about the error in B/A still holds.
Philosophaie
Philosophaie 2013 年 6 月 24 日
編集済み: Philosophaie 2013 年 6 月 24 日
Yes it is X = A\B for A*X = B not B/A.
I want to make an m-file of this process.
This is probably why it was not working.

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

Disha
Disha 2022 年 6 月 28 日

0 投票

A = [= [1.1 0 2.1 -3.5 6;0 1.1 -6.6 2.8 3.4;2.1 0.1 0.3 -0.4 1.3;-1.4 5.1 0 1.1 0]

カテゴリ

タグ

質問済み:

2013 年 6 月 24 日

回答済み:

2022 年 6 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by