Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Need to conduct analysis across four .mat files at once - how do I load multiple .mat files?
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to create a function that utilizes a struct containing four different sets of data so that I can analyze data across all four sets. What do I need to do? i.e. I have dataset1.mat, dataset2.mat, dataset3.mat, and dataset4.mat and I want to track data across all 4 of these.
2 件のコメント
回答 (1 件)
Antonio Ciociola
2020 年 8 月 16 日
The problem seems to be related to this instruction:
s = [1 4];
But then you're loading the mat files in this way:
s(i) = load(filenames{1,i});
So,you're trying to put a structure into an array of double.
Try to change the code by removing the wrong line of code (s=[1 4])
2 件のコメント
Antonio Ciociola
2020 年 8 月 16 日
編集済み: Antonio Ciociola
2020 年 8 月 16 日
This happens because you have different mat files. Try with this line of code:
s{i} = load(filenames{1,i});
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!