编程复杂定积分绘制图​像,总是出错,新人很​难理解变成语句,求指​点迷津。

1 次查看(过去 30 天)
figure
x=0.181:0.001:0.654;
a=8.83.*((684-152.4.*tan(x)).^0.47).*((0.10431.*tan(x)-0.1159.*(tan(x).^2)).^0.43);
b=(1.21.*(a.*0.64))./(1+0.37.*(a.^1.26));
c=36.47.*tan(x)-18.19;
d=18.19-4.05.*tan(x);
f=(0.0127.*(b.^1.2).*log10(17937./(c.*(d.^2)))+0.5.*(1-b)).*((tan(x)-0.5)./(cos(x).^2));
g=int(@(x)'f',0.181,0.236);
h=2.*int(@(x)'f',0.236,0.416);
k=int(@(x)'f',0.416,0.654);
if ('x'<0.236)
y=g;
elseif(0.236<='x'&&'x'<0.416)
y=h;
else
y=k;
end
plot(x,y)

采纳的回答

华纳公司开户【微8785092】
仅供参考
syms x
a=8.83.*((684-152.4.*tan(x)).^0.47).*((0.10431.*tan(x)-0.1159.*(tan(x).^2)).^0.43);
b=(1.21.*(a.*0.64))./(1+0.37.*(a.^1.26));
c=36.47.*tan(x)-18.19;
d=18.19-4.05.*tan(x);
f=(0.0127.*(b.^1.2).*log10(17937./(c.*(d.^2)))+0.5.*(1-b)).*((tan(x)-0.5)./(cos(x).^2));
fun = matlabFunction(f);
g=integral(fun,0.181,0.236);
h=2.*integral(fun,0.236,0.416);
k=integral(fun,0.416,0.654);
x=0.181:0.001:0.654;
y = g*(x<0.236)+h*(0.236<=x&x<0.416)+k*(x>=0.416);
figure
plot(x,y)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!