フィルターのクリア

What (%.5g\n) does mean?

2 ビュー (過去 30 日間)
hudof najeeb
hudof najeeb 2017 年 7 月 11 日
回答済み: Sebastian Castro 2017 年 7 月 11 日
disp(['PSNR ' num2str(measerr(CoverImg,s))])
[~, MSE] = measerr(CoverImg,s);
fprintf('MSE: %.5g\n', MSE)
the result is
PSNR 44.6192
MSE: 2.2447
I want MSE : 0.22447 What I must do?

回答 (1 件)

Sebastian Castro
Sebastian Castro 2017 年 7 月 11 日
The format string will indicate the display precision -- up to 5 decimal points.
What you're asking is to actually divide the value of MSE by 10... I am sure the following code will give you what you want, but you're manipulating your results and this is likely wrong.
fprintf('MSE: %.5g\n', MSE/10)
- Sebastian

Community Treasure Hunt

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

Start Hunting!

Translated by