naming figure window in a for loop

5 ビュー (過去 30 日間)
sani
sani 2020 年 5 月 28 日
コメント済み: sani 2020 年 5 月 28 日
Hello everyone,
I want to create figures for my data by using a for loop. when I'm trying to edit the figure window's name I'm getting this error:
Error using figure
Numeric figure handles not supported with parameter-value pairs.
this is my code, what am I doing wrong?
for i= 1:length(ROI_L)
index = find((Ge_energy>=ROI_L(i)) & (Ge_energy<=ROI_H(i)));%| (Ge_energy>348) & (Ge_energy<353));
GER = Ge_energy(index);
SCINT = scint_energy(index);
mean_E = ROI_L(i)+(ROI_H(i)-ROI_L(i))/2;
figure('Name','single mode efficiency is %6.2f% \n',mean_E);
histogram(GER,'DisplayStyle','stairs','BinWidth',0.1)
xlabel('\gamma Energy [keV]')
ylabel('counts')
title('Ra-226 gamma 74 keV')
end

採用された回答

madhan ravi
madhan ravi 2020 年 5 月 28 日
figure('Name',sprintf('single mode efficiency is %6.2f% \n',mean_E))
  1 件のコメント
sani
sani 2020 年 5 月 28 日
Thanks!!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by