Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I have a very simple problem as you can see below (file attached too.) I'd like to fit a line to measured data. There's something fundamental about minimize (and solving in general) that I don't understand and can't seem to find by searching through the literature. Changing TOL and CTOL have no effect. Help?
Solved! Go to Solution.
To use "minimize" you have to make "Residual" a function depending on the two arguments "Slope" and "Offset".
But the result you achieve when you use "stdev" is not what you are looking for!
Actually the slope is OK , but the Offset is zero.
Here is a better way to get the line
For other ways to do a linear regression you may lookup the examples in the help files: Example: Linear Regression
To use "minimize" you have to make "Residual" a function depending on the two arguments "Slope" and "Offset".
But the result you achieve when you use "stdev" is not what you are looking for!
Actually the slope is OK , but the Offset is zero.
Here is a better way to get the line
For other ways to do a linear regression you may lookup the examples in the help files: Example: Linear Regression
Thanks! I appreciate the dual methods. What I wasn't getting was how to make "functions" believe it or not. I'll be attempting things much more complicated than linear fitting so I'll need more general approaches.
This worked: