Hi, how should I display the name for image. Only Name without the pathways.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
JI RONG
am 2 Dez. 2022
Kommentiert: JI RONG
am 3 Dez. 2022
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1217322/image.png)
InfoImage = imfinfo(filename);
imgName = InfoImage.Filename;
app.FileNameEditField.Value = [imgName];
Thank you for your help.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Dez. 2022
[~, imgName, extension] = fileparts(InfoImage.Filename);
Then use either imgName alone or [imgName, extension] if you want to preserve the extension.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer 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!