a question about function -- uigetfile()

2 Ansichten (letzte 30 Tage)
vx2008
vx2008 am 5 Jan. 2014
Bearbeitet: Stephen23 am 7 Dez. 2015
the code
[FileName PathName]=uigetfile(('*.xlsx'), 'Choose a File');
runs Ok; but the code
[FileName PathName]=uigetfile(('*.xlsx','Excel Files(*.xlsx)'; '*.txt','Txt Files(*.txt)'), 'Choose a File');
runs wrongly. why? how should I modify it?

Akzeptierte Antwort

Adriano Bittar
Adriano Bittar am 6 Jun. 2014
Bearbeitet: Stephen23 am 7 Dez. 2015
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 {};

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by