Rank: 369323 based on 0 downloads (last 30 days) and 0 file submitted
photo

Alex Vaughan

E-mail
Company/University
CSHL/HHMI

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Alex Vaughan
Updated File Comments Rating
25 Mar 2012 Total Least Squares Method Mathematical method known as total least squares or orthogonal regression or error-in-variables. Author: Ivo Petras

Lovely code. I found one bug, which I believe is the same as the one Martin points out; his fix didn't work for me, though. In numerFminS, the 'fun' parameter is never used, and the fit is always evaluated based on whatever is in model.m. This can be fixed as:

- 65: [yy]=model(xdata, a);
+ 65: [yy] = @(xdata,a)fun(xdata,a)

Following this, I can then call the function without using model.m as:

fun = @(a,x)(a(1) .* ( x.^a(2) ) ./ (x.^a(2) + a(3).^a(2))); %or whatever.
[ErrTLS,P_TLS] = numerFminS( fun , 3 , lowerBounds, upperBounds, x, y)

Cheers,
Alex

Contact us