| 查看: 2115 | 回复: 10 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
bluethky木虫 (著名写手)
|
[求助]
matlab程序错误,提示如下【弄了半夜还是不行】 已有2人参与
|
||
|
function [x,y,Y]=levydistrintheorytest(t0,lambda,T,a,b); % 计算理论的二维levy分布的图象 画出来的3维曲面图 % t0 :levy walk 趋于零的时间 % lambda :幂律值 % T:时间 % a: 离散的大步长的最大值 % b:小步长的最大值 error=0.125/180*pi; %假定平行于坐标轴的误差角度 syms u c=-gamma(2-lambda)*t0^(lambda-1)*cos(pi*lambda/2)/lambda; h1=20; %大的离散步长 h2=0.1; %小的离散步长 x1=-a:h1:-b; x2=-(b-h2):h2 b-h2);x3=b:h1:a; x=[x1,x2,x3]; disp('%%%%%%%%%%%计算的次数为%%%%%%%%%%%%%%%') N=length(x) y=x; Z=zeros(N,N); for i=1:1 %x坐标 i for j=1:N % y坐标 theta=angle(complex(x(i),y(j))); if theta<error && theta>-error % x轴正半轴 Z(j,i)=double(int(cos(u.*x(i)/(c*T)^(1/lambda))*exp(-(abs(u))^lambda)./pi+cos(1/u.*x(i)/(c*T)^(1/lambda))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1)); elseif theta<pi/2+error && theta>pi/2-error % y轴正半轴 Z(j,i)=double(int(cos(u.*y(j)/(c*T)^(1/lambda))*exp(-(abs(u))^lambda)./pi+cos(1/u.*y(j)/(c*T)^(1/lambda))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1)); elseif theta>pi-error || theta<-pi+error %x轴负半轴 Z(j,i)=double(int(cos(u.*x(i)/(c*T)^(1/lambda))*exp(-(abs(u))^lambda)./pi+cos(1/u.*x(i)/(c*T)^(1/lambda))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1)); elseif theta>-pi/2-error && theta<-pi/2+error %y轴负半轴 Z(j,i)=double(int(cos(u.*y(j)/(c*T)^(1/lambda))*exp(-(abs(u))^lambda)./pi+cos(1/u.*y(j)/(c*T)^(1/lambda))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1)); else Z(j,i)=double(int(cos(u.*x(i)/(c*T)^(1/lambda)/sin(theta))*exp(-(abs(u))^lambda)./pi+cos(1/u.*x(i)/(c*T)^(1/lambda)/sin(theta))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1))*(double(int(cos(u.*y(j)/(c*T)^(1/lambda)/cos(theta))*exp(-(abs(u))^lambda)./pi+cos(1/u.*y(j)/(c*T)^(1/lambda)/cos(theta))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1))); %zy=(double(int(cos(u.*y(j)/(c*T)^(1/lambda)/cos(theta))*exp(-(abs(u))^lambda)./pi+cos(1/u.*y(j)/(c*T)^(1/lambda)/cos(theta))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1))); %Z(j,i)=zx*zy; end end end Y=Z; end 错误提示; Error using mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array. If the input expression contains a symbolic variable, use the VPA function instead. Error in sym/double (line 710) Xstr = mupadmex('symobj::double', S.s, 0); Error in levydistrintheorytest (line 37) Z(j,i)=double(int(cos(u.*x(i)/(c*T)^(1/lambda)/sin(theta))*exp(-(abs(u))^lambda)./pi+cos(1/u.*x(i)/(c*T)^(1/lambda)/sin(theta))*exp(-1/(abs(u))^lambda)/u^2./pi,0,1))*(double(int(cos(u.*y( |
» 猜你喜欢
一志愿华中农业071010,320求调剂
已经有19人回复
304求调剂
已经有7人回复
求博导|生物质基多孔碳/超级电容方向,已有相关成果,寻能源材料/碳材料方向老师
已经有3人回复
二苯甲酮酸类衍生物
已经有6人回复
接受任何调剂
已经有4人回复
一志愿中科大材料与化工,353分还有调剂学校吗
已经有12人回复
320求调剂
已经有4人回复
295分求调剂
已经有5人回复
294求调剂
已经有8人回复
山东双非院校考核超级无底线,领导幸灾乐祸,教师遭殃恐
已经有8人回复
11楼2015-05-02 14:47:50
bluethky
木虫 (著名写手)
- 应助: 1 (幼儿园)
- 金币: 4713.8
- 散金: 849
- 红花: 11
- 帖子: 1401
- 在线: 227.7小时
- 虫号: 2609601
- 注册: 2013-08-21
- 专业: 植物学研究的新技术、新方
2楼2014-05-10 01:35:55
wurongjun
专家顾问 (职业作家)
-

专家经验: +831 - 数学EPI: 9
- 应助: 791 (博后)
- 贵宾: 0.308
- 金币: 24609
- 散金: 310
- 红花: 75
- 帖子: 3004
- 在线: 881.4小时
- 虫号: 1368482
- 注册: 2011-08-14
- 性别: GG
- 专业: 计算数学与科学工程计算
- 管辖: 数学

3楼2014-05-10 06:53:34
bluethky
木虫 (著名写手)
- 应助: 1 (幼儿园)
- 金币: 4713.8
- 散金: 849
- 红花: 11
- 帖子: 1401
- 在线: 227.7小时
- 虫号: 2609601
- 注册: 2013-08-21
- 专业: 植物学研究的新技术、新方
4楼2014-05-10 10:03:23













b-h2);
回复此楼