 % script nlineg1 example
% generate some data

%Arthur Jutan 
%Dept of Chemical and Biochemical Enginering
%Univ of Western Ontario
%London Ontario Canada, N6A 5B9

t=[0.:.01:1]';
p=[4 5];
y=exp(-p(1)*t).*sin(2*pi*p(2)*t);
% rand('normal');
y=y+.01*randn(size(y));  %add noise

beta0=[2	3];	  %initial guess
%[f,p,var,iter,cor,std]=leasqr1(t,y,pin,'model'{,tol,iter,wt});
[ypred,beta] = nlin(t,y,'mdlnlin',beta0);
