Hi Heinz, For the regression errors, I am not an expert but from wikipedia or from reference below, I would risk the following code (at your peril): https://pages.mtu.edu/~fmorriso/cm3215/UncertaintySlopeInterceptOfLeastSquaresFit.pdf
// Note: for degrees of freedom>=6, t-distribution ~2 N = length(MW); mx = mean(MW); SSxx = sum((MW -mx).^2); Ea = diag(2*sig/sqrt(SSxx)) // take Ea diagonals; slope 95% confidence Eb = diag(2*sig*sqrt(1/N+mx^2/SSxx)) // take Eb diagonals; intercept 95% confidence Concerning the least squares regression part, it seems the code may be written more compactly using reglin: [a,b,sig]=reglin(MW',Y') // simple least squares linear regression GG= a.*.xx' + repmat(b,size(xx')) plot(xx,GG','LineWidth',1); Regards, Rafael
_______________________________________________ users mailing list [email protected] http://lists.scilab.org/mailman/listinfo/users
