function par=bonddemo(z,g,dt,parstart)
%input z must be column vector of positive numbers.
%plot bond yields
dz=diff(z);
n=length(dz);
K=1;
while(K <8)
K=menu('which plot?','x(t) versus t','dx(t) versus t','dx vs x', 'estimate parameters','normal QQ plot of residuals','stable 1.85 QQ plot','equilibrium distribution','END');
st=str2mat('plot1(z,dt);','plot2(dz,dt);','plot6(z,dz,dt);','[par,r1]=estdiff(parstart(1),parstart(2),.004,z);','normplot(r1);','plot5(r1)','plotstat(par,z);',' ');
eval(st(K,:));
pause(5);
end








