matlab 怎么编循环函数求助大神帮我把下面程序改成‘0.005’这个值为【0.005;0.001;0.015】的循环函数clc;f=@(x)([3*log10(x(1))-2*log10(0.005)-0.3060*0.005+0.088*x(1)-2020.8*x(2)+19.21;2*log10(0.005)+3*log10(x(2))-11.61*
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 21:19:23
matlab 怎么编循环函数求助大神帮我把下面程序改成‘0.005’这个值为【0.005;0.001;0.015】的循环函数clc;f=@(x)([3*log10(x(1))-2*log10(0.005)-0.3060*0.005+0.088*x(1)-2020.8*x(2)+19.21;2*log10(0.005)+3*log10(x(2))-11.61*
matlab 怎么编循环函数
求助大神帮我把下面程序改成‘0.005’这个值为【0.005;0.001;0.015】
的循环函数
clc;
f=@(x)([3*log10(x(1))-2*log10(0.005)-0.3060*0.005+0.088*x(1)-2020.8*x(2)+19.21;2*log10(0.005)+3*log10(x(2))-11.61*0.005-813.0940*x(1)-13.8*x(2)+14.54]);
x0=[0.0000001;0.00002];
x=fsolve(f,x0)
digits(10)
vpa(x)
matlab 怎么编循环函数求助大神帮我把下面程序改成‘0.005’这个值为【0.005;0.001;0.015】的循环函数clc;f=@(x)([3*log10(x(1))-2*log10(0.005)-0.3060*0.005+0.088*x(1)-2020.8*x(2)+19.21;2*log10(0.005)+3*log10(x(2))-11.61*
digits(10)
for i = [0.005 0.001 0.015]
f=@(x)([3*log10(x(1))-2*log10(i)-0.3060*i+0.088*x(1)-2020.8*x(2)+19.21;
2*log10(i)+3*log10(x(2))-11.61*i-813.0940*x(1)-13.8*x(2)+14.54]);
x0=[0.0000001; 0.00002];
disp('----');
x = fsolve(f,x0)
vpa(x)
end