When i put matrix with infinitly many solutions the matlab give me one solution. Why?
5 views (last 30 days)
Show older comments
Hello, good afternoon
I'm doing search about MATLAB application, and i would like to ask a quastion..
When i put matrix with infinitly many solutions the matlab give me one solution. Why? And why this exactly solution? How can it choose between the solutions, it depends of what?
I hope that you understand me and help me.
Thank you,
0 Comments
Answers (1)
John D'Errico
on 16 Apr 2015
So clearly you expect MATLAB to return all of those infinitely many solutions. It might take a while to compute them all, since infinity is a really big place. Do you have enough RAM and/or disk space to store an infinite set of solutions?
Depending on the solver you used, you can get different solutions, since all are equally viable. Backslash returns a basic solution, with some elements exactly zero. Pinv yields a minimum norm solution. I'd need to think about lsqr. You can of course write the set of all solutions as any single solution, plus any arbitrary linear combination of the null-space vectors of your matrix.
0 Comments
See Also
Categories
Find more on Function Creation 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!