How can I use following code to select .txt files instead of .m file
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Manav Divekar
le 18 Oct 2021
Commenté : Yongjian Feng
le 18 Oct 2021
[files,path] = uigetfile('MultiSelect', 'on');
if iscell(files)
for n = 1:length(files)
data = importdata(fullfile(path,files{n})); % fullfile including path
% save data
end
else
data = importdata(fullfile(path,files));
% save data
end
0 commentaires
Réponse acceptée
Yongjian Feng
le 18 Oct 2021
```
[file,path] = uigetfile({'*.m';'*.slx';'*.mat';'*.*'},...
'File Selector');
```
2 commentaires
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!