User input to load mat file

MATLAB programming related topics
Post Reply
User avatar
amh
Site Admin
Posts: 263
Joined: Thu Jan 06, 2022 12:35 am

User input to load mat file

Post 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)
Post Reply