How do i increase the number value in " "

1 次查看(过去 30 天)
I have
a file to read multiple folder by looking at the number
%Image number set
number = "1"
[first,second,third,fourth,five]= returnFiles(number);
%The function
function [first,second,third,fourth,five] = returnFiles(number)
.....
How do I keep looping and increase the number to read multiple file

采纳的回答

Walter Roberson
Walter Roberson 2021-8-9
for K = 1 : 50
number = string(K);
[first,second,third,fourth,five] = returnFiles(number);
end
  2 个评论
LinusL
LinusL 2021-8-9
what does K = 1 : 50 do?
It count toward 50?
Rik
Rik 2021-8-9
It creates a vector from 1 to 50. Combining it with the for keyword means it will execute the contents of the loop with each value of that vector stored in K.
Any Matlab tutorial will have taught you this. I would highly encourage you to do one.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by