comp.soft-sys.matlab - The MathWorks calculation and visualization package.
Hello, I'm new to matlab, but managed to generate an M-code using the curve fitting tool box and even to modify this code. What I couldn't find in the manual/online help is the syntax to display the final weights that the fit command uses in the robust mode. It would be nice to actually see or check how each data point is weighted in the regression. Thanks for any help. thorsten Here are some code snipplets of the M-file I use: fo_ = fitoptions('method','NonlinearLeastSquares','Robust','On','MaxFunEvals',15000); ok_ = isfinite(x) & isfinite(y); % Fit this model using new data [cf_,gof] = fit(x(ok_),y(ok_),ft_,fo_);
Dear readers, I have recently been looking through the options in Matlab R2008a for performing a weighted robust linear regression. It seems that the curve fitting toolbox is the only function that accepts additional weights. However, I might have come across some inconsistency in the usage of the weights that I would like to have confirmed. In the help section on Robust Least Squares (Least-Squares Fitting, Curve Fitting Toolbox) it says the following: "Note that if you supply your own regression weight vector, the final weight is the product of the robust weight and the regression weight". In the code of fit.m there is no such multiplication, in fact the weights from the robust fit are not eve given as outputs. What I did find though is that the initially supplied weights are squared on the first line in the "goodstruct"-function. Is this really correct or is this supposed to be the product of the robust and initial weights as stated in the help section? Unfortunately this calculation will affect all the subsequent calculations of the statistics so at the moment I don't really trust in using the cft for this purpose. I have checked the code in Matlab 2009a as well and it is the same thing. I would really appreciate it if someone could tell me if this is correct or if this is a bug that has slipped through every revision. Thanks!
Hi, does somebody knows how to put weight in just one point or two points in the data when iam trying to fit a curve ??? (using the editor, with commands, not the curve fitting tool ), thanks a lot!
Hi list, Is there a way of getting an f-value or some form of significance value on curves fitted with fit(). I've been looking but I don't seem to find anything close to a standard f or p-value. The r-square is available but this only tells me how close the values are to the fitted curve not necessarily something about the strength of the fit. Kind regards, Koen