Cant solve x*A=y
Show older comments
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
Answers (1)
David Young
on 16 Jan 2012
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.
Categories
Find more on Variables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!