? Subscript indices must either be real positive integers or
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/22 03:49:05
? Subscript indices must either be real positive integers or logicals. 什么错误啊?
n=[1:15];x=zeros(1,15);x=rand(1,10);z=zeros(1,15);y=[x,0,0,0,0,0];
forj=3:1:12
z(j)=y(j-2)
end
subplot(2,1,1);stem(n,y);subplot(2,1,2);stem(n,z)
n=[1:15];x=zeros(1,15);x=rand(1,10);z=zeros(1,15);y=[x,0,0,0,0,0];
forj=3:1:12
z(j)=y(j-2)
end
subplot(2,1,1);stem(n,y);subplot(2,1,2);stem(n,z)
Subscript indices must either be real positive integers or logicals
下标索引必须是正整数类型或者逻辑类型
出错原因:在访问矩阵(包括向量、二维矩阵、多维数组,下同)的过程中,下标索引要么从 0 开始,要么出现了负数.注:matlab 的语法规定矩阵的索引从 1 开始,这与 C 等编程语言的习惯不一样.
解决办法:自己调试一下程序,把下标为 0 或者负数的地方修正.
另,你的程序我运行了,没有错误.能得到结果.
我的运行环境是Matlab 7.5.0(R2007b),WindowsXP SP3
下标索引必须是正整数类型或者逻辑类型
出错原因:在访问矩阵(包括向量、二维矩阵、多维数组,下同)的过程中,下标索引要么从 0 开始,要么出现了负数.注:matlab 的语法规定矩阵的索引从 1 开始,这与 C 等编程语言的习惯不一样.
解决办法:自己调试一下程序,把下标为 0 或者负数的地方修正.
另,你的程序我运行了,没有错误.能得到结果.
我的运行环境是Matlab 7.5.0(R2007b),WindowsXP SP3
? 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 integ
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 in
之后的运行又出现:Subscript indices must either be real positive inte
用matlab图像配准中出现Subscript indices must either be real positive
问一下在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