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

Jose

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Jose View all
Updated File Comments Rating
11 Sep 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

Dear Prof. Balda,
I apologise for jumping to conclusions. You are correct and I have a test here that shows how LMFnlsq gives the same results as nlinfit and lsqnonlin.

hu1 = @(b,x) (b(1)*x(:,2) - x(:,3)/b(5))./(1 + b(2)*x(:,1) + b(3)*x(:,2) + b(4)*x(:,3));
x1=[470 285 470 470 470 100 100 470 100 100 100 285 285]';
x2=[300 80 300 80 80 190 80 190 300 300 80 300 190]';
x3=[10 10 120 120 10 10 65 65 54 120 120 10 120]';
y=[8.55 3.79 4.82 0.02 2.75 14.39 2.54 4.35 13.00 8.50 0.05 11.32 3.13]';
x=[x1 x2 x3];
beta=[1 0.05 0.02 0.1 2];
[betahat,f,J]=nlinfit(x,y,hu1,beta);
disp(betahat);
% 1.2526 0.0628 0.0400 0.1124 1.1914

fun = @(b) (b(1)*x2 - x3/b(5))./(1 + b(2)*x1 + b(3)*x2 + b(4)*x3) - y;
[C,ssq,cnt] = LMFnlsq(fun, beta, 'Display',[-10,0], 'FunTol',1e-10);
disp(C);
% 1.2526 0.0628 0.0400 0.1124 1.1914

lsqnonlin(fun, beta)
% 1.2526 0.0628 0.0400 0.1124 1.1914

08 Sep 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

Dear Prof. Balda,
There is a bug on both LMFnlsq and LMFnlsq2, as shown in the code:

x1 = [470, 285, 470, 470, 470, 100, 100, 470, 100, 100, 100, 285, 285];
x2 = [300, 80, 300, 80, 80, 190, 80, 190, 300, 300, 80, 300, 190];
x3 = [ 10, 10, 120, 120, 10, 10, 65, 65, 54, 120, 120, 10, 120];
y = [8.55, 3.79, 4.82, 0.02, 2.75, 14.39, 2.54, 4.35, 13.00, 8.50, 0.05, 11.32, 3.13];
fun = @(b) ( b(1)*x2 - x3/b(5) )/(1 + b(2)*x1 + b(3)*x2 + b(4)*x3) - y;
[C,ssq,cnt] = LMFnlsq(fun, ones(5,1))

Error using *
Inner matrix dimensions must agree.

Error in LMFnlsq>getAv (line 434)
v = J'*r;

Error in LMFnlsq (line 279)
[A,v] = getAv(FUN,JAC,x,r,epsx);

09 Apr 2013 NIST Statistical Reference Datasets for Nonlinear Regression MAT file of all the benchmark Nonlinear Regression problems from the NIST StRD website Author: Adam Gripton

Hi Adam,
Thank you for your submission.
Would you, please, create an example of using it?
For example, to test the following NLLS solver:
http://www.mathworks.com/matlabcentral/fileexchange/17534-lmfnlsq-solution-of-nonlinear-least-squares

07 Apr 2013 Unit Hydrograph Estimate Unit Hydrograph with Nakayasu, Clark and S-hydrograph Author: Taesam Lee

Hello,
Can you post the data that you used for plotting the graphic UH.jpg?
It would with good to test your code with your data.

07 Apr 2013 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

Dear Prof. Balda,
Thank you so much, I understand it better now!
For the bounded Rosenbrock problem:
-2 <= x[1] <= 2
-2 <= x[2] <= 2
We need 4 penalty functions:
(x[1]>2)*(x[1]-2)*w2,
(x[1]<-2)*(x[1]+2)*w2,
(x[2]>2)*(x[2]-2)*w2,
(x[2]<-2)*(x[2]+2)*w2
And we try several values for w2, for example 0.1, 0.2, 0.4, ..., 1.9 to get the "best" value for w2.
Is this correct?

Contact us