function [intcf1,intcf2]=intcf
v = 0.4*340;
b = 0.09;
omg = 10*pi;
syms xx;
syms t;
intcf1=0;
intcf2=0;
cf1 =exp(omg*(t-xx/v))*(sqrt((xx+b)/(xx-b))-1);
cf2 =exp(omg*(t-xx/v))*(xx-sqrt(xx^2-b^2));
%要对以上两个表达式中xx项进行积分一下是我采用的方式
%直接用int得不到结果,所以我用离散后累加求和的方式
for c=b+0.0001:0.001:20
temp1= subs(cf1,'xx',c);
intcf1=intcf1+temp1*0.001;
end;
for c=b+0.0001:0.001:20
temp2= subs(cf2,'xx',c);
intcf2=intcf2+temp2*0.001;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
结果成了这个样子
Warning: Use "maple restart" to restart Maple or "clear maplemex"to unload the Maple kernel.
Note that you cannot unload the kernel on Macintosh.
> In maple at 59
In intcf at 4
1/1000*exp(10*pi*(t-23251/1360000))*(1/22351*24151^(1/2)*22351(*exp(*exp(10*pi*(t-31261/1360000))*(1/30361*32161^(1/2)*^(1/2)-1)+1/1000*exp(10*pi*(t-4111/1360000))*(1/3211*5011^(1/2)*321... Output truncated. Text exceeds maximum line length for Command Window display.
??? Error using ==> sym.sym>char2sym
Error, integer too large in context
Error in ==> sym.sym at 92
S = char2sym(x);
Error in ==> sym.maple at 92
result = sym(result);
Error in ==> sym.plus at 22
X = maple(A(

,'+',B(

);
Error in ==> intcf at 24
intcf1=intcf1+temp1*0.001;