How to load multiple mat file in sequence without natsortfiles?
Ältere Kommentare anzeigen
if three files in my directory file1.mat file2.mat & file13.mat
when i load it load in sequence
file1.mat
file13.mat
file.2mat
> Sort function not working for me
https://www.mathworks.com/matlabcentral/answers/2037626-how-to-load-all-mat-files-in-the-filenumber-wise-sequentially
1 Kommentar
"Sort function not working for me"
Did you download NATSORTFILES from here?:
Did you unzip it onto the MATLAB Search Path? (e.g. into the current directory)
Do you get an error message? If so, what is the complete error message?
Antworten (1)
F=sort("file"+(1:14)+".mat"); F=F(randperm(end)) %Unordered file list
[~,is]= sort( str2double(extract(F,digitsPattern)) );
F=F(is) %list of files sorted
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!