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

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 11월 13일

0 개 추천

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

Thue Thomsen
Thue Thomsen 2011년 11월 13일
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 2011년 11월 13일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Community Treasure Hunt

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

Start Hunting!

Translated by