Hi, how should I display the name for image. Only Name without the pathways.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
JI RONG
el 2 de Dic. de 2022
Comentada: JI RONG
el 3 de Dic. de 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 comentarios
Respuesta aceptada
Walter Roberson
el 2 de Dic. de 2022
[~, imgName, extension] = fileparts(InfoImage.Filename);
Then use either imgName alone or [imgName, extension] if you want to preserve the extension.
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!