Load Data in For loop

1 回表示 (過去 30 日間)
Ah01mat
Ah01mat 2011 年 10 月 25 日
回答済み: Voss 2021 年 12 月 28 日
Hi my problem is i want to open data files respectively(in for loop)
i have n0.mat,n1.mat,n2.mat,...,n999.mat
and
for r=0:999
aa = sprintf('%d',r);
load('n' aa .mat', 'AAA') ;
end
but it isnt working so what can i do?

回答 (1 件)

Voss
Voss 2021 年 12 月 28 日
for r=0:999
aa = sprintf('%d',r);
load(['n' aa '.mat'], 'AAA') ;
end

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by