How to save image with floating number name?

1 回表示 (過去 30 日間)
Ayushi Joshi
Ayushi Joshi 2021 年 6 月 23 日
回答済み: DGM 2021 年 6 月 23 日
Hi,
I am trying to write a script and needed help with come of the code part.
I want to save the image text in png format with a name in floating points.

回答 (1 件)

DGM
DGM 2021 年 6 月 23 日
You mean something like this?
mypict = rand(100);
mn = mean(mypict(:));
filename = sprintf('the_mean_pixel_value_is_%.4e.png',mn);
filename = 'the_mean_pixel_value_is_5.0081e-01.png'
imwrite(mypict,filename);

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by