Cant solve x*A=y
古いコメントを表示
Hello,
i need to get the solution for:
x*A=y
x=(1xn)unknown
A=(nxm)
y=(1xm)
n>m
I tried x = A'\y';
and x = solve ('x*A=y');
Solve didnt worked at all, and teh upper one seems to work in same cases, but in others it was absolutly wrong:
A =
-1 -1 1 1 1 0
0 0 0 -1 0 1
0 0 0 0 0 0
1 0 0 0 0 0
0 1 0 0 0 0
0 0 -1 0 0 0
0 0 0 0 -1 -1
y =
0 0 0 0 0 1
ans =
-0.0000 0.3333 0 -0.0000 -0.0000 0 -0.3333
Anyone any Idea?
Thanks
Jonas
回答 (1 件)
David Young
2012 年 1 月 16 日
A is rank-deficient, so there isn't a unique solution.
If you modify A to give it full rank, then
x = y/A
computes x such that x*A is close to y.
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!