Matlab, operator A\B
What is the result of the operation A\B, where A(1, m) and B (1, m)?
In the manual it is written:
A\B returns a least-squares solution to the system of equations A*x= B.
So it means x = inv (A'*A)*A'*B? However, the matrix A'*A is singular...
Let us suppose:
A=[1 2 3] B=[6 7 6] A\B 0 0 0 0 0 0 2.0000 2.3333 2.0000 If ve use MLS: C = inv (A'*A) singular matrix C = pinv(A'*A) 0.0051 0.0102 0.0153 0.0102 0.0204 0.0306 0.0153 0.0306 0.0459 D= C*A'*B 0.4286 0.5000 0.4286 0.8571 1.0000 0.8571 1.2857 1.5000 1.2857
So results A\B and inv (A'*A)*A'*B are different...
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.Answers:
My MATLAB (R2010b) says quite a lot about what
A\Bdoes:
mldivide(A,B)and the equivalentA\Bperform matrix left division (back slash).AandBmust be matrices that have the same number of rows, unlessAis a scalar, in which caseA\Bperforms element-wise division — that is,A\B = A.\B.If
Ais a square matrix,A\Bis roughly the same asinv(A)*B, except it is computed in a different way. IfAis ann-by-nmatrix andBis a column vector withnelements, or a matrix with several such columns, thenX = A\Bis the solution to the equationAX = B. A warning message is displayed ifAis badly scaled or nearly singular.If
Ais anm-by-nmatrix withm ~= nandBis a column vector withmcomponents, or a matrix with several such columns, thenX = A\Bis the solution in the least squares sense toSEE COMPLETE ANSWER CLICK THE LINKhttps://matlabhelpers.com/questions/matlab-operator-a-b.php
Comments
Post a Comment