Does anyone know how to get a specific type of file from matlab from a default directory?
For example, I tried:
defaultpath='C:\'; %enter in path of interest
[name]=uigetfile(defaultpath);
But how do I make it get only files with i.e. .wav extensions?
I tried:
defaultpath='C:\'; %enter in path of interest
[name]=uigetfile(defaultpath,
{'*.wav', 'All Wave Files (*.wav)';...
'*.*', 'All Files (*.*)'}, ...
'Pick a file');
but it bombs on the comma after defaultpath in the uigetfile function…
I’m sure this is something common, but I’m not sure how to implement it.
Any ideas? Thanks 🙂
Proper usage would be: