last values in for cycle
1 次查看(过去 30 天)
显示 更早的评论
Lets say I have vector of values. length of that vector is 350. and i want for cycle that do something with first hundred of values, then with second hundred, third hundred and in the end with the last fifty. i dont know how to deal with the last 50 values. and i have to work withh all values a work with them by hundreds. Thank you for help!!
0 个评论
回答(1 个)
Image Analyst
2013-4-18
Do the for loops like this
for k = 1 : 100
% Do stuff with vector(k)
end
for k = 101 : 200
% Do stuff with vector(k)
end
for k = 201 : 300
% Do stuff with vector(k)
end
for k = 301 : 350
% Do stuff with vector(k)
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!