04-04-2012 09:54 AM
Hello all,
I need to implement the "Linear Fit.vi" in MATLAB. I am using the Least Squares method in this .vi but unfortunately MATLAB operator "\" does not give me the same result. This is strange since they both claim to use exactly the same methods of calculation.
Here is the MATLAB link for this operation.
http://www.mathworks.com/help/toolbox/curvefit/bq_5ka6-1.html
I appreciate your help on this case.
Thanks.
Solved! Go to Solution.
04-04-2012 10:59 AM
This is the LabVIEW forum.
Is this a matlab question or a LabVIEW question? If you have matlab problems, I suggest you ask elsewhere. I am sure there is a dedicated forum.
If you want to implement the same algorithm in LabVIEW, please say so. 😉
04-04-2012 12:41 PM
Re-reading your post, you are leaving out way to much information for us to make sense of it all.
Since you are apparently comparing LabVIEW linear fit and matlab linear fit, I assume you have fully functioning code for both.
Can you attach your VI and the important section of your matlab code?
Where does the "\" operator fit into all this?
In what way are the results different. Are they at least similar? If you do a fit with paper and pencil using very few points, does it agree with LabVIEW, matlab, or neither?