MATLAB: Display time in the title

num2strplottimetitle

Hey.
I would like to ask whether it´s possible to display a timestamp in the title? Let me make a eksampel:
you can write in your m-file: title(['temperture ',num2str(max(temp)), '[deg]'])
then the max temperture will display in the title.
Is it possible to display the time in the title when the temperture hit the "max" also? (eg. 100 s)
Thank you

Best Answer

If you can find the max temperature, you can use the index to find the time.
[MaxTemp,Index]=max(temp); TimeAtMaxTemp=time(Index);
Where time is your time vector. Then you can use same num2str() technique to display it in the title.