%script example for leasqr (several x's)
% gen data for model y= p0 + p1*x1 +p2*x2
% model in vmodel.m :  function y=vmodel(x,p)

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

x=[1 2
3 4
8 1
1 5
7 8];
y=[3 4 9 6 10]';
pin=[ 1 3 5];% init guess
[f,p,var,iter,cor,std]=leasqr1(x,y,pin,'vmodel');
