Hi everyone, I have a set of 100 readings from a test rig, all are multilevel struct .mat files. I am trying to group a specific field (which is common within all the files) into a single row matrix (100,:). So from the help of the Mathworks community i was able to load all the 100 files into one struct, but my real objective is to get a specific field,
folder_name=uigetdir(); filenameExtension='.mat';TempMatrix=cell(100,1);for n=1:100 filename=[folder_name,'\exp_0',int2str(n),filenameExtension]; TempMatrix{n,:}=load(filename); end
all the files i want to load are named as exp_01.mat, exp_02.mat…….exp_0100.mat
the only way to accest the file I want is like this:
example for exp_02:
FinalMatrix=[TempMatrix(2).data.exp_02.Y(3).Data];
so u see i need to change the file name each time to get the answer. But how do i get it in a for loop to store all the 100 files target field(Y(3)) into a single array matrix for ease of access.
Any help/advice would be realy appreciated. Thank you.
iv attached few example files.
Best Answer