MATLAB: How to read multiple mat files and and extract data from those

load multiple files

I have a multiple .mat files (like 100 file) I need to load and extract specific data from those files. I.e to extract the row and columns so can anyone please help me out in this.

Best Answer

Hi Suhas Goravale Siddaramu,
I have tried out your attached mat. file. I guess you are saying row 11 instead of column 11. In your mat.file, there is variable Pre-cell, it has 3 columns and 14 rows.
mat = dir('*.mat');
for q = 1:length(mat)
load(mat(q).name);
data(q,:) = Pre_cell(11,:)
end
with the additional line of code data(q,:) = Pre_cell(11,:), it will load all the row 11 of mat file into data.
Should you have any doubt, you may ask.