a question about function -- uigetfile()

14 visualizzazioni (ultimi 30 giorni)
vx2008
vx2008 il 5 Gen 2014
Modificato: Stephen23 il 7 Dic 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?

Risposta accettata

Adriano Bittar
Adriano Bittar il 6 Giu 2014
Modificato: Stephen23 il 7 Dic 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 {};

Più risposte (0)

Categorie

Scopri di più su Dialog Boxes in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by