Problem with animated line, not drawing anything

9 ビュー (過去 30 日間)
Santiago Marin
Santiago Marin 2019 年 9 月 2 日
コメント済み: Santiago Marin 2019 年 9 月 3 日
I want to plot the value a metric takes while varying the filter sigma value, the code is as follows:
ImgOrg=imread('ROIOriginal_pgm25.png'); %Load the image
for sigmaVal=0.5:0.1:5
Imed=imgaussfilt(ImgOrg,sigmaVal); %Apply the filter with the sigma value
[peaksnr, ~] = psnr(Imed, ImgOrg); %Calculate the metric after applying the filter
h = animatedline;
addpoints(h,sigmaVal,peaksnr)
drawnow limitrate
end
But all I get is an empty figure, I can't see any line or any point. I'm in Matlab R2019a.

採用された回答

Walter Roberson
Walter Roberson 2019 年 9 月 2 日
Move the
h = animatedline;
to before the loop.
  1 件のコメント
Santiago Marin
Santiago Marin 2019 年 9 月 3 日
Thanks you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by