Hi.. Try this code:
[filename, pathname] = uigetfile({'*.xlsx','Excel Files(*.xlsx)'; '*.txt','Txt Files(*.txt)'}, 'Pick a file');
I think it's only missing the {};
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!