作业帮 > 综合 > 作业

关于matlab积分的使用,

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/13 19:49:38
关于matlab积分的使用,
syms w x m oj b r q ob o h s0 b0 t p M k
f1=x*{exp(w*m*i-0.5*w^2*oj^2)-1-w*m*i};
f2=b - r -q +0.5*o^2 - h*o^2 + subs(f1,'w',-i*h-i)-subs(f1,'w',-i*h);
f3=x * exp( m * h + 0.5 * h^2 * oj^2) * ( exp( i* w * (m + h * oj^2 ) - 0.5 * w^2 * oj^2) -1 - i * w *(m + h * oj^2) );
cf1=exp( i * w * log ( s0 / b0 ) + t * (0.5 * i * w * o^2) - 0.5 * w^2 * o^2 + f3 + subs(f3 ,'w' ,i) );
cf2=exp( i * w * log ( s0 / b0 ) + t * (-0.5 * i * w * o^2) - 0.5 * w^2 * o^2 + subs(f3,'h',h+1 ) - i * w * subs( subs(f3,'h',h+1 ) ,'w' ,-i) );
f4=exp(-i * w * k * p / M )/(i*w) * cf1
f5=int(f4,w,-10000,10000)
这里计算总是报错
Operation terminated by user during ==> mupadengine.mupadengine>mupadengine.evalin at 119
In ==> mupadengine.mupadengine>mupadengine.feval at 157
[S,err] = evalin(engine,stmt);
In ==> mupadfeval at 24
[S,err] = feval(symengine,cmd,varargin{:}); % returns sym
In ==> map at 14
[result,status] = mupadfeval(fcn,obj,varargin{:});
In ==> sym.int at 56
r = reshape(map(f(:),'mlint',x,a,b),size(f));
In ==> test at 8
f5=int(f4,w,-10000,10000)
关于matlab积分的使用,
我算了一下,没有解析解
syms w x m oj b r q ob o h s0 b0 t p M k
f1=x*{exp(w*m*i-0.5*w^2*oj^2)-1-w*m*i};
f2=b - r -q +0.5*o^2 - h*o^2 + subs(f1,'w',-i*h-i)-subs(f1,'w',-i*h);
f3=x * exp( m * h + 0.5 * h^2 * oj^2) * ( exp( i* w * (m + h * oj^2 ) - 0.5 * w^2 * oj^2) -1 - i * w *(m + h * oj^2) );
cf1=exp( i * w * log ( s0 / b0 ) + t * (0.5 * i * w * o^2) - 0.5 * w^2 * o^2 + f3 + subs(f3 , 'w' ,i) );
cf2=exp( i * w * log ( s0 / b0 ) + t * (-0.5 * i * w * o^2) - 0.5 * w^2 * o^2 + subs(f3,'h',h+1 ) - i * w * subs( subs(f3,'h',h+1 ) , 'w' ,-i) );
f4=exp(-i * w * k * p / M )/(i*w) * cf1
f5=int(f4,w,-10000,10000)

f4 =

-(i*exp(i*w*log(s0/b0) - (o^2*w^2)/2 + x*exp((h^2*oj^2)/2 + m*h)*(m + exp(oj^2/2 - h*oj^2 - m) + h*oj^2 - 1) - x*exp((h^2*oj^2)/2 + m*h)*(i*w*(h*oj^2 + m) - exp(i*w*(h*oj^2 + m) - 1/2*oj^2*w^2) + 1) + (i*o^2*t*w)/2))/(w*exp((i*k*p*w)/M))

Warning: Explicit integral could not be found.
> In sym.int at 64

f5 =

int(-(i*exp(i*w*log(s0/b0) - (o^2*w^2)/2 + x*exp((h^2*oj^2)/2 + m*h)*(m + exp(oj^2/2 - h*oj^2 - m) + h*oj^2 - 1) - x*exp((h^2*oj^2)/2 + m*h)*(i*w*(h*oj^2 + m) - exp(i*w*(h*oj^2 + m) - 1/2*oj^2*w^2) + 1) + (i*o^2*t*w)/2))/(w*exp((i*k*p*w)/M)), w = -10000..10000)