![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175660/image.png)
Change the x axis in a figure with time
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi all,
I have a question:
I have a figure and I want to change the x axis (which are numbers from 1 to 48) to time scale, like this:
00:00 00:30 01:00......................23:30
any ideas?
thanks
댓글 수: 0
답변 (2개)
Peter Perkins
2017년 4월 26일
편집: Peter Perkins
2017년 4월 26일
In MATLAB R2014b or newer, try this:
>> t = duration(0:.5:23.5,0,0,'Format','hh:mm');
>> x = rand(size(t));
>> plot(t,x)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175660/image.png)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!