how to solve an equation of the form ax=b

how to solve an equation of the form ax=b where a has dimension 1024*1023 and x has dimension 1023*1?i have used pinv command.but when i multiplied the result with a,i didnt get the same b matrix

Answers (2)

Stephen23
Stephen23 on 8 Feb 2016
Edited: Stephen23 on 8 Feb 2016
Use mldivide: "Solve systems of linear equations Ax = B for x"
If you have 1024 equations for 1023 variables, the system can in general not be solved exactly.
What you get by typing
x=a\b
is an optimal solution in the least-squares sense, i.e. a solution that minimizes the error
||a*x-b||_2-Norm
Best wishes
Torsten.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Tags

Asked:

on 8 Feb 2016

Answered:

on 8 Feb 2016

Community Treasure Hunt

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

Start Hunting!