加入for循环的输出
Y= zeros(3, 354)
for m = 1 : 118
R=GridData.R2(:,3*m-2:3*m);
X=GridData.X2(:,3*m-2:3*m);
B=GridData.B1(:,3*m-2:3*m);
G=GridData.G1(:,3*m-2:3*m);
Y(:,m)= R+ 1j*X;
m=m+1;
end
这是错误:位置2中的索引超过数组范围(不得超过3)。我想从for循环中加入输出。
Y= zeros(3, 354)
for m = 1 : 118
R=GridData.R2(:,3*m-2:3*m);
X=GridData.X2(:,3*m-2:3*m);
B=GridData.B1(:,3*m-2:3*m);
G=GridData.G1(:,3*m-2:3*m);
Y(:,m)= R+ 1j*X;
m=m+1;
end
This is the error: Index in position 2 exceeds array bounds (must not exceed 3). I would like to concatenate the output from a for loop.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论