I have separate .mat files, trials in a study, which consits of the same variables but the value change between files.
I want to use a drop-down component in MATLAB app designer to select a file, load its variables and display various plots.
Any ideas how I could do this? Thank you in advance.
I had been loading a single file as a property like this: var = load('Trial1.mat') This code worked.
So then I tried to use this layout to load the files using the drop down menu but it didn't work..
function SelectFileDropDownValueChanged(app, event)
value = app.SelectFileDropDown.Value;
if strcmp(value,'Trial 1')
var = load('Trial1.mat');
elseif strcmp(value,'Trial 2')
var = load('Trial2.mat');
elseif strcmp(value,'Trial 3')
var = load('Trial3.mat');
elseif strcmp(value,'Trial 4')
var = load('Trial4.mat');
elseif strcmp(value,'Trial5')
var = load('Trial5.mat');
end
Any ideas how I could do this? Thanks in advance!