Hi
I'm trying to run a command that lets me open a file and then will run a process on that imported file depending on characters in the file name.
Say for example I open a file form a folder and then save that filepath as a string. I then want to run a process on it depending on the name of the file path.
The file names are TestMax, TestMin,TestMean
for i = int8(1:nUPSS) [filename1, dir] = uigetfile('C:\Outputs','Select Trial'); load([dir filename1])
Therefore my trial name becomes either
filename1 = 'TrialMin.mat'Orfilename1 = 'TrialMax.mat'Orfilename1 = 'TrialMean.mat'
I then want to be able to run my next line of code depending on the characters in the string.
If filename1 contains Max... do thiselseif filename1 contains Min... do this
I hope this makes sense and any help would be much appreciated
Best Answer