構造体を読み込む
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur ワークスペース変数と MAT ファイル dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!