matlab编程 如式,如何编程含有符号参数的积分表达式,希望有大神帮帮那
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/11 15:15:55
matlab编程 如式,如何编程含有符号参数的积分表达式,希望有大神帮帮那
close all
clear,clc
% 积分下界 [-1.5 1.5]
d1 = linspace(-1.5,1.5,20);
dlength = length(d1);
for j = 1:dlength %
d = d1(j);
fvz = @(x) (x-d).^1.5.*exp(-x.^2);
fz(j) = quadgk(fvz,d,inf);
dy(j) = d;
end
figure
plot(dy,fz)
xlabel( '积分下界' );
title(['积分下界:',num2str(d1(1)),'至',num2str(d1(dlength))])
clear,clc
% 积分下界 [-1.5 1.5]
d1 = linspace(-1.5,1.5,20);
dlength = length(d1);
for j = 1:dlength %
d = d1(j);
fvz = @(x) (x-d).^1.5.*exp(-x.^2);
fz(j) = quadgk(fvz,d,inf);
dy(j) = d;
end
figure
plot(dy,fz)
xlabel( '积分下界' );
title(['积分下界:',num2str(d1(1)),'至',num2str(d1(dlength))])