关于积分问题。

(151115727451828646838272*L)/(16813535600788068359375*(L^2 + z^2)^(3/2))我在得到这个函数表达式后想设定L范围后对z进行积分,然后画出图形,但前面为了得到这个函数我把L和z均定义为syms,因此提醒我Conversion to double from sym is not possible.我应该怎么修改程序,恳请帮助,不胜感激。得到表达式后我的程序是这样的
L=1:0.1:10;
y=int(myE(z,L),z,-10,10);
plot(L,y)

 采纳的回答

xigivi
xigivi 2022-11-22

0 个投票

syms z
y=@(L,z)(151115727451828646838272*L)./(16813535600788068359375*(L.^2 + z.^2).^(3/2));
arrayfun(@(L)integral(@(z)y(L,z),-10,10),1:.1:10)
plot(1:.1:10,ans)

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!