![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/513107/image.jpeg)
Updating plot title for a few hundred figure using a loop
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I have multiple figures for which I want to update my title from a variable (Datetime) in my workspace. Can you pleasehelp me figure it out.
Thankyou![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/510817/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/510817/image.jpeg)
댓글 수: 0
답변 (1개)
Siddharth Bhutiya
2021년 2월 8일
You can convert your datetime variable into a string and pass it as an input to the title command
x = 1:10;
dt = datetime;
plot(x);
title(string(dt));
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/513107/image.jpeg)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Title에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!