readmatrix in a loop

23 visualizaciones (últimos 30 días)
Rica
Rica el 1 de Jun. de 2021
Respondida: David Hill el 1 de Jun. de 2021
i tried to use readmatrix in a loop to get data from specified files
for l=1:5
A=readmatrix(['File_' num2str(l) '.txt'])
end
it seems that A contains not all the data of the files but only of the last files!
I'll be thankfull for your advices!

Respuesta aceptada

David Hill
David Hill el 1 de Jun. de 2021
for l=1:5
A{l}=readmatrix(['File_' num2str(l) '.txt']);%not sure if all your data is the same size
end

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by