二重积分问题。

r=15;E=20000;v=0.25;z=40;C=56;D=32.32;q=-0.45;%基本量
R4=@(w,d)sqrt((r-d*cos(w))^2+(d*sin(w))^2+z^2);%%代入下式直接计算还是有问题
fun1=@(w,d)(1+v)/(2*pi*E*R4)*(r*z/R4^2-(1-2*v)*r/(R4+z))*q%被积函数
Sr2=quad2d(fun1,-0.5*pi,0.5*pi,0,100)
fun2=@(w,d)(1+v)/(2*pi*E*R4)*(2*(1-v)+z^2/R4^2)*q%被积函数
Sz2=quad2d(fun2,-0.5*pi,0.5*pi,0,100)

 Accepted Answer

ahopid
ahopid on 22 Nov 2022

0 votes

表达式里不能代入一个函数句柄 R4,而是代入函数表达式 R4(w,d)。另外,函数定义里使用向量化运算 .* ./ .^
r=15;E=20000;v=0.25;z=40;C=56;D=32.32;q=-0.45;%基本量
R4=@(w,d)sqrt((r-d.*cos(w)).^2+(d.*sin(w)).^2+z^2);%%代入下式直接计算还是有问题
fun1=@(w,d)(1+v)./(2*pi*E*R4(w,d)).*(r*z./R4(w,d).^2-(1-2*v)*r./(R4(w,d)+z))*q%被积函数
Sr2=quad2d(fun1,-0.5*pi,0.5*pi,0,100)
fun2=@(w,d)(1+v)./(2*pi*E*R4(w,d)).*(2*(1-v)+z^2./R4(w,d).^2)*q%被积函数
Sz2=quad2d(fun2,-0.5*pi,0.5*pi,0,100)

More Answers (0)

Categories

Find more on MATLAB 快速入门 in Help Center and File Exchange

Tags

Asked:

on 22 Nov 2022

Answered:

on 22 Nov 2022

Community Treasure Hunt

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

Start Hunting!