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

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)

 채택된 답변

0 개 추천

仅供参考
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개)

카테고리

도움말 센터File Exchange에서 语言基础知识에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!