load some data.mat placed in different folders in loop
Afficher commentaires plus anciens
here is the code i use to change the current folder
%%
[pathname] = uigetdir('D:\folder1');
cd(pathname);
files = dir( fullfile(pathname,'*.mat') ); % list all *.mat files
files = {files.name}'; %# file names
%%
%-----------------------------------------------------------------
then i load the different data.mat in loop by creating separate workspace variable and perform my task on these data and get result. my problem is i have fixed task to be performed on data placed in different folders so i changes folder manually by changing path each time. for example to perform my task on data placed in 'D:/folder2' i have to change it each time and run the program.
is there a way to change current folder in loop and get all result (plot of result) at once.
since i cant place all data in a single folder
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!