> 其他 >
下面这段代码老是出现In an assignment A(I) = B, the number of elements in B and I must be the same
f_ji=[];
f_ou=[];
for i=1:length(f)
if mod(i,2)~=0
f_ji=[f_ji,f(i)];
else
f_ou=[f_ou,f(i)];
end
end
for i=1:length(f_ji)
g(i)=d(:,f_ji(i):f_ou(i));
end
哪里出错了
人气:420 ℃ 时间:2020-02-05 14:03:47
解答
像似 g(i)=d(:,f_ji(i):f_ou(i)); 错了.
出错信息说,A(I) = B 这种形式的赋值语句,B 里的元素个数 与 I 要相等.
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版