% JNTCREG.M
% Example Joint Conf Region  uses modelcr.m leasqr1.m,jointcr.m,sumsscr.m
% example from es413/512 assig4
% enter data
%x=[1 4 7 10 13 16]';
%y=[185 618 847 901 1000 955]';

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

x=[4 4 4 16 16 16 ]';
y=[634 641 618 934 966 1011]';
disp(' enter guess for 2 params e.g. 900 .2 ')
pin=readv(2)
%pin=[900  .2] % init guess
[f,p,var,iter,cor,std]=leasqr1(x,y,pin,'modelcr',1e-5);
% calc joint sum of squares region
disp('working....')
jointcr(x,y,p,1,'sumsscr',std,0.05);
