Cant solve x*A=y
Afficher commentaires plus anciens
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
Réponses (1)
David Young
le 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.
Catégories
En savoir plus sur Variables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!