readmatrix in a loop

23 ビュー (過去 30 日間)
Rica
Rica 2021 年 6 月 1 日
回答済み: David Hill 2021 年 6 月 1 日
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!

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by