编程复杂定积分绘制图像,总是出错,新人很难理解变成语句,求指点迷津。
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
华纳公司客服【微8785092】
am 19 Mai 2023
Beantwortet: 华纳公司开户【微8785092】
am 19 Mai 2023
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 Kommentare
Akzeptierte Antwort
华纳公司开户【微8785092】
am 19 Mai 2023
仅供参考
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!