求大神帮用matlab解方程组
问题描述:
求大神帮用matlab解方程组
方程如下:
W0(1+(Z1/Z0)^2)^0.5=1.669e-3
W0(1+(Z2/Z0)^2)^0.5=3.38e-3
z2-z1=0.1
w0=(3.37e-6*z0)^0.5
答
%x(1)=z0 x(2)=z1 x(3)=z2 x(4)=w0
f=@(x)[x(4).*sqrt(1+(x(2)./x(1)).^2)-1.669e-3
x(4).*sqrt(1+(x(3)./x(1)).^2)-3.38e-3
x(3)-x(2)-0.1
x(4)-sqrt(3.37e-6*x(1))];
fsolve(f,[0.1 0.1 0.2 0])
Optimization terminated:first-order optimality is less than options.TolFun.
ans =
0.01143253271003 0.09653672599277 0.19653672599277 0.00019628480133
所以
z0=0.01143253271003
z1=0.09653672599277
z2=0.19653672599277
w0=0.00019628480133