function [x1,x2,dd]=mymain
i=1;
x1=[];
x2=[];
dd=[];
ld=[32.878;10.915;23.233;28.777;141.119;12.671;24.729;39.577;28.41;52.58;46.987];
ro=[0.427;0.393;0.488;0.407;0.493;0.342;0.516;0.387;0.415;0.353;0.41];
ve=[7.274;3.016;4.919;1.937;7.708;3.249;5.466;4.809;2.492;2.824;2.686];
std=[32.878;10.915;18.96;28.777;136.364;12.671;23.027;38.354;21.049;52.482;46.725];
while i<=11
x0=[1;1];
x=fsolve(@myfun2,x0,'[]',ro(i),ve(i),ld(i));
x1(i)=x(1);
x2(i)=x(2);
dd(i)=(x(1)-std(i))/(x(1)*x(2));
i=i+1;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function F=myfun2(x,ro,ve,ld)
F=[((x(1)*normcdf((log(x(1)/ld)+0.02+0.5*x(2)*x(2))/x(2))-exp(-0.02)*ld*normcdf((log(x(1)/ld)+0.02-0.5*x(2)*x(2))/x(2)))-ve);((x(1)*x(2)*normcdf((log(x(1)/ld)+0.02+0.5*x(2)*x(2))/x(2)))/ve-ro)]; |