subs(Q2,y,y1)这样已经满足你说的要求.
估计下面的结果是你想要的吧:
不过,Q3 =1.0063e-018-----数值有点小
%%%%%%%%%%%%%%%%%%%
clear all
x=linspace(0,2,10);
syms y;
h=double(6.63*10^(-34));
m=double(1.75e5);
u1=1;
u2=3;
y0=0;
n0=1e4;
v=5e14;
d=2;
k=double(h*v*n0*u1*m/(4*pi));
A=k./((d-x).^2+(y-y0).^2);
B=u1+u2*sqrt((d-x).^2+(y-y0).^2);
C=exp((-1)*B);
D=A.*C;
%Q1=dblquad(inline(D),0,0.13,-50,50);
Q2=trapz(x,D)
y1=y; % 这句其实是多余的
y1=linspace(-50,50,10)
Q20=subs(Q2,y,y1)
Q3=trapz(y1,Q20)
%%%%%%%%%%%%%%%
[ 本帖最后由 xjzuo 于 2007-5-22 16:02 编辑 ] |