Linear Regression (replicating the backslash or MLDIVIDE function)

14 views (last 30 days)
I have a legacy system I need to update with the exact equivalent of Matlabs Linear Regression function as calculated with the "\" i.e. the backslash operator. Precision is critically important. Ideally I'd like to see the Matlab code so I can re-rewrite it in the target legacy language.
How can I see the code? or the algorithm/pseudocode for how Matlab performs the calculation?
Moved here by Matt J:
My data is two vectors A and B each 20 in length. I don't know how MLDIVIDE handles it

Answers (1)

the cyclist
the cyclist on 17 Nov 2014
There is not a simple answer.
See the documentation for mldivide and click on the Algorithms section near the bottom.
mldivide is a built-in MATLAB function (not a script that you can edit and peer into), so I don't believe you will be able to look at the actual code.

Categories

Find more on Polynomials 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!