loop with struct fields and plot (changing plot styles) - matlab -


that's thing making me bit crazy-noob far.

i have struct storing data successive experiments, 7 field per each experiment:

  • veq1
  • rpmdispl1
  • displ1
  • tau1
  • sigma1
  • mu1
  • v_displ1
  • veq2
  • ...

then i'd plot in loops, (k total datasets plotted)

    figure(1)     hold     ii=1:k;         subplot(2,1,1)         eval(['plot(struct.displ',num2str(ii),',struct.tau',num2str(ii),')']);          subplot(2,1,2)         eval(['plot(struct.displ',num2str(ii),',struct.v_displ',num2str(ii),')']);     end 

but not allowed in changing plot axes style among plots of loop. (using either roots or gca settings, line , color string variables, etc)

so thought in different way, like:

    ii=1:k;         subplot(2,1,1)         plot(struct.displ(num2str(ii)),struct.tau(num2str(ii)),line,color)         subplot(2,1,2)         plot(struct.displ(num2str(ii)),struct.v_displ(num2str(ii)),line,color);      end 

but no way. last idea (rather working code), admit it. can suggest me work out?

i'd grateful.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -