How to remove file extension when using ugetfile in app designer?
142 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Rik
le 18 Nov 2020
The easiest way to remove an extension is with fileparts:
[p,f,e]=fileparts(fullfilename);
fullfilename=fullfile(p,f);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!