Problem with the cycle
7 次查看(过去 30 天)
显示 更早的评论
Hello. It's a relative simples question but im having problem with the next cycle:
for n=1:length(B)
for h=1:10
Center(n)= B(h);
end
end
I want to read a cell array B() that has an increment of 10 and save the value in the Center cell array.
Example: for Center(1) = B(1) and for Center(2)= B(10).
What is happening is that the B(h) only see the value of B(10) and fill the Center cell only with that value. Prior to the code presented i have a cell array B that is 1x1351. What am i missing?
3 个评论
采纳的回答
更多回答(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!