Hi, how should I display the name for image. Only Name without the pathways.
1 view (last 30 days)
Show older comments
InfoImage = imfinfo(filename);
imgName = InfoImage.Filename;
app.FileNameEditField.Value = [imgName];
Thank you for your help.
0 Comments
Accepted Answer
Walter Roberson
on 2 Dec 2022
[~, imgName, extension] = fileparts(InfoImage.Filename);
Then use either imgName alone or [imgName, extension] if you want to preserve the extension.
More Answers (0)
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!