简体   繁体   中英

A\b or b\A for A*x=b in MATLAB

A solution of A*x = b can be obtained by x = A\\b . But I did x = b\\A as I did not look for exact syntax. I got different vectors x in with A\\b and b\\A . I understood that A\\b is more or less equivalent to inv(A)*b , but I don't understand what exactly is happening if I do b\\A . Does anyone know about it?

From the MATLAB documentation:

If A is a rectangular m-by-n matrix with m ~= n, and B is a matrix with m rows, then A\\B returns a least-squares solution to the system of equations A*x= B.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM