構造体を読み込む
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matlab初心者です。
test.matにあるtest_01,_02,_03.....の複数の構造体を一つずつ読み込み、各構造体内にある、Fというフィールドを取り出すのに、途中なのですが、以下のようにしました。
dataDir = ''C:\Users\*******\Documents\test.mat''
nub = 10
tf = [ ]
for cnt=1:nsub
dname = fullfile(dataDir,sprintf('test_0%d',cnt));
data = load(dname);
tf = squeeze(data.F);
end
この時 ”ファイル 'C:\Users\*********\Documents\test.mat\test_01' を読み取れません。そのような
ファイルまたはディレクトリはありません。”と表示されます。
構造体を読み込むときはどのようにしたらよいでしょうか。
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ワークスペース変数と MAT ファイル finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!