Effacer les filtres
Effacer les filtres

How can I use following code to select .txt files instead of .m file

2 vues (au cours des 30 derniers jours)
Manav Divekar
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

Réponse acceptée

Yongjian Feng
Yongjian Feng le 18 Oct 2021
Follow this link, you can set the filter:
```
[file,path] = uigetfile({'*.m';'*.slx';'*.mat';'*.*'},...
'File Selector');
```
  2 commentaires
Manav Divekar
Manav Divekar le 18 Oct 2021
Thank You!
Yongjian Feng
Yongjian Feng le 18 Oct 2021
Please accept the answer if it is correct. Thanks.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by