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

 Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 13 Nov 2011

0 votes

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.

2 commentaires

Thue Thomsen
Thue Thomsen le 13 Nov 2011
Thank you very much.
The temperture hits the maxtemp several times, is it possible to only display the time where it hits maxtemp the first time, without reducing the simulation time?
Fangjun Jiang
Fangjun Jiang le 13 Nov 2011
If all the maximum temperature values are the same (which is unlikely though), the max() function will only return the index for the first one.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by