数值积分的问题
clear all;clcS =1.0e-009 * ;
XP=0;YP=1;
X1=-1;Y1=-1;
X2=1;Y2=1;
aa=0.01;bb=0.005;
LL=sqrt((X1-X2)^2+(Y1-Y2)^2);
sig1=-1;
sig2=-1;
A=;
L=;
N=[-2.8032;0.8032];
p=[-0.1239,-0.356]*1e-9;
q=[-0.1258i,-0.1256i]*1e-9;
s=;
R(1)=(aa-i*s(1)*bb)/2;R(2)=(aa-i*s(2)*bb)/2;
zp(1)=XP+s(1)*YP;zp(2)=XP+s(2)*YP; % 内点也是力点
kesi0(1)=(zp(1)+sqrt(zp(1)^2-(aa^2+s(1)^2*bb^2)))/(aa-i*s(1)*bb);
kesi0(2)=(zp(2)+sqrt(zp(2)^2-(aa^2+s(2)^2*bb^2)))/(aa-i*s(2)*bb);
syms t;
x=(X1+X2)/2+t.*(X1-X2)./LL*sig1; diff_x=(X2-X1)/LL;% x x'关于t的表达式
y=(Y1+Y2)/2+t.*(Y1-Y2)./LL*sig2; %diff_y=(Y2-Y1)/LL;
z1=x+s(1).*y; %z1关于t的表达式
z2=x+s(2).*y;
kesi1=(z1+sqrt(z1.^2-(aa^2+s(1)^2*bb^2)))./(aa-i*s(1)*bb);%kesi1关于t的表达式
kesi2=(z2+sqrt(z2.^2-(aa^2+s(2)^2*bb^2)))./(aa-i*s(2)*bb);
phi1=A(1)*log(R(1).*(kesi1-kesi0(1)))+L(1)*conj(A(1)).*log(1-1./(conj(kesi0(1)).*kesi1))...
+N(2)*conj(A(2)).*log(1-1./(conj(kesi0(2)).*kesi1));
phi2=A(2)*log(R(2).*(kesi2-kesi0(2)))+L(2)*conj(A(2)).*log(1-1./(conj(kesi0(2)).*kesi2))...
+N(1)*conj(A(1)).*log(1-1./(conj(kesi0(1)).*kesi2));
u11_1=2*real(p(1).*phi1+p(2).*phi2); %关于t的表达式
u11_diff=diff(u11_1,'t')/diff_x; %求导
zz=vectorize(char(2*u11_diff));
fun=eval(['@(t)',zz]);%eval(expression) executes expression, a string containing any valid MATLAB expression.
D111 = quadl(fun,-LL/2,LL/2);
出现错误如下:
??? Error using ==> abs
Too many input arguments.
Error in ==>
Error in ==> quadl at 70
y = feval(f,x,varargin{:}); y = y(:).';
Error in ==> test at 43
D111 = quadl(fun,-LL/2,LL/2);
调用格式没有错,为何出现这种错误
页:
[1]