a question about function -- uigetfile()

15 次查看(过去 30 天)
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?

采纳的回答

Adriano Bittar
Adriano Bittar 2014-6-6
编辑:Stephen23 2015-12-7
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 {};

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by