MATLAB: Question of ‘uigetfile’ command order

orderuigetfile

Hi everyone. I was confused about the order in 'uigetfile'. When I use this commend to open multiple files, like: filename = uigetfile('*.mat', 'Pick a file', 'MultiSelect', 'on'); maybe more than 100 files. And I use these data to build a matrix and then to plot a figure. Then in this figure I found that maybe one of my data is specific and I need to pick it out. But all I know is which row this data in my matrix but can't match it to the data in my file cause I don't know the order of opening the data.Is there anyone could help me? Thanks

Best Answer

The uigetfile help states that "File names in the cell array are sorted in the order that that the user's platform uses", which is basically undefined for Windows. You could download and sort the filenames using my FEX submission nastsortfiles: