问一下在matlab中出现Subscript indices must either be real positive
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 23:42:06
问一下在matlab中出现Subscript indices must either be real positive integers or logicals是啥意思
[kx,ky]=meshgrid(0:pi/100:pi,0:pi/100:pi)
u=0.5
t1=-1,t2=1.3,t3=0.85,t4=0.85
ax(kx,ky)=-2*t1.*cos(kx)-2*t2.*cos(ky)-4*t3.*cos(kx).*cos(ky)
ay(kx,ky)=-2*t2.*cos(kx)-2*t1.*cos(ky)-4*t3.*cos(kx).*cos(ky)
axy(kx,ky)=-4*t4.*sin(kx).*sin(ky)
au(kx,ky)=0.5*ax(kx,ky)+0.5*ay(kx,ky),a_(kkx,ky)=0.5*ax(kx,ky)-0.5*ay(kx,ky)
Eu(kx,ky)=au(kx,ky)+sqrt((a_(kx,ky)).^2+(axy(kx,ky)).^2)-u
E_(kx,ky)=au(kx,ky)-sqrt((a_(kx,ky)).^2+(axy(kx,ky)).^2)-u
plot(Eu(kx,ky),E_(kx,ky))
[kx,ky]=meshgrid(0:pi/100:pi,0:pi/100:pi)
u=0.5
t1=-1,t2=1.3,t3=0.85,t4=0.85
ax(kx,ky)=-2*t1.*cos(kx)-2*t2.*cos(ky)-4*t3.*cos(kx).*cos(ky)
ay(kx,ky)=-2*t2.*cos(kx)-2*t1.*cos(ky)-4*t3.*cos(kx).*cos(ky)
axy(kx,ky)=-4*t4.*sin(kx).*sin(ky)
au(kx,ky)=0.5*ax(kx,ky)+0.5*ay(kx,ky),a_(kkx,ky)=0.5*ax(kx,ky)-0.5*ay(kx,ky)
Eu(kx,ky)=au(kx,ky)+sqrt((a_(kx,ky)).^2+(axy(kx,ky)).^2)-u
E_(kx,ky)=au(kx,ky)-sqrt((a_(kx,ky)).^2+(axy(kx,ky)).^2)-u
plot(Eu(kx,ky),E_(kx,ky))
在MATLAB,矩阵向量的下标只能从1开始,不能从0开始.提醒你错误的意思是“下标只能是正实数或逻辑值”.
你的ax矩阵是(0,0)开始的矩阵,所以出错.
你的ax矩阵是(0,0)开始的矩阵,所以出错.
问一下在matlab中出现Subscript indices must either be real positive
matlab 出现Subscript indices must either be real positive inte
MATLAB出现?Subscript indices must either be real positive inte
matlab出现? Subscript indices must either be real positive int
matlab :Subscript indices must either be real positive integ
用matlab图像配准中出现Subscript indices must either be real positive
MATLAB里出现Subscript indices must either be real positive inte
matlab为什么出现 Subscript indices must either be real positive i
? Subscript indices must either be real positive integers or
Subscript indices must either be real positive integers or l
MATLAB程序错误?Subscript indices must either be real positive in
之后的运行又出现:Subscript indices must either be real positive inte