MATLAB Answers

0

how to set figure handles in a for loop?

Yasmin Samy さんによって質問されました 2018 年 1 月 9 日
Hello! I have a for loop that uses two different tables to simultaneously create two figures (multiple curves are plotted on each figure with each iteration - so we use hold on). hold on is that it continues plotting on the same figure (multiple curves - multiple year time series).
It worked with one of my for loops but not on the first. I`m not sure what i`m missing. Below is an extract of the for loop...
%defining data sets
py_yr =PSD_avg(k,4:25);
py_stdyr=PSD_std(k,4:25);
figure(figa)
plotpsd=semilogx(psd_x,py_yr,'-o','Color',col);
title({['PSD at ',stn,' (', yrtitle,')']});
set(gca,'Fontsize',12);
ylabel('dV/dlnr');
hold on
figure(figb)
plotstd=semilogx(psd_x,py_stdyr,'-o','Color',col);
title({['Standard deviation at ',stn,' (', yrtitle,')']});
set(gca,'Fontsize',12);
ylabel('dV/dlnr');
hold on

  0 件のコメント

サインイン to comment.

0 件の回答


Translated by