構造体を読み込む
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 ワークスペース変数と MAT ファイル 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!