Adding dynamic titles to plots in Matlab loops

  • Context: MATLAB 
  • Thread starter Thread starter ADunn
  • Start date Start date
  • Tags Tags
    Figure Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 11K views
ADunn
Messages
6
Reaction score
0
In Matlab I have a for loop that plots a figure in each loop. (M = 0.85:1:2.85)
I would like to put a title on the figure "M = 0.85" for the first plot, "M=1.85" for the second plot, and "M=2.85" for the third plot. Can anyone tell me how to do this?

Thank you!
 
Physics news on Phys.org
Sorry, got an extra quote mark in there.
title(['M = ',num2str(M)])