is this allowed in a forloop
1 次查看(过去 30 天)
显示 更早的评论
I have the following code and I just wonderend if it was allowed to do something like this.
for i=[1:11 10:-1:1]
for j=1:2
for k=[6:11 10:-1:1 2:6]
for g=1:21
FXcross1(g)=(dly(g).*BZ(i,j,k)-dlz(g).*BY(i,j,k))*I;
end
end
end
end
I mean for the i and the k, nog for the j and the g. Can you do something like that. Since I want to acces, for k, the indexnumbers 6 7 8 9 10 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6.
thanks in advance
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!