> 其他 >
? 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)
人气:165 ℃ 时间:2020-04-03 01:08:22
解答
Subscript indices must either be real positive integers or logicals下标索引必须是正整数类型或者逻辑类型出错原因:在访问矩阵(包括向量、二维矩阵、多维数组,下同)的过程中,下标索引要么从 0 开始,要么出现...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版