As I understand the current code combines the files from the selected folder which is not desired according to the new workflow. As per the question, you require only to select a single file from the directory and process its data for plotting.
After reviewing your code, I observe that the user only manually selects the directory and the files get auto-selected based on their naming convention. If you require the user to select the file required manually as well, then 'uigetfile' will help in acheiving this.
Alternatively, if the file of only a particular naming comnevntion/extension is required to be selected, then the index of that file can be selected by using the 'filelist' variable as defined in the given code.
Node: The for loop going f5rom 1:numel(inf) would not be required as we are not combining multiple files in the new use-case.
The following MathWorks documentations can be referred to know more:
Thanks.