How to remove file extension when using ugetfile in app designer?
146 次查看(过去 30 天)
显示 更早的评论
Hi All
I use
[filename,pathname] = uigetfile('*.xlsx');% add ur extension post period within parathesis.
fullfilename = fullfile(pathname,filename);
A = xlsread(fullfilename); % if it is a excel file. else use whatever it is.
but then I need to use the filename but without its extension, how do I do that in app designer
0 个评论
采纳的回答
Rik
2020-11-18
The easiest way to remove an extension is with fileparts:
[p,f,e]=fileparts(fullfilename);
fullfilename=fullfile(p,f);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!