Page 1 of 1

User input to load mat file

Posted: Wed Apr 03, 2024 9:29 am
by amh
Script for user input to load mat file

Code: Select all

 [file,path] = uigetfile('*.mat');
if isequal(file,0)
   disp('User selected Cancel');
else
   disp(['User selected ', fullfile(path,file)]);
end

A =load([path,file]);

B = struct2cell(A);
data = cell2mat(B);

plot(data)