Borrar filtros
Borrar filtros

How do i increase the number value in " "

1 visualización (últimos 30 días)
LinusL
LinusL el 9 de Ag. de 2021
Comentada: Rik el 9 de Ag. de 2021
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 9 de Ag. de 2021
for K = 1 : 50
number = string(K);
[first,second,third,fourth,five] = returnFiles(number);
end
  2 comentarios
LinusL
LinusL el 9 de Ag. de 2021
what does K = 1 : 50 do?
It count toward 50?
Rik
Rik el 9 de Ag. de 2021
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by