Importing time values into matlab in format hh:mm without converting to demical
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
How can you import time values in the format hh:mm (i.e. 09:31 21:13) in a text file into matlab?
When I load like them in using this command, they get converted to decimal.
time=load('time.txt');
I also would like to plot a histogram of them.
Many thanks
John
댓글 수: 2
per isakson
2012년 2월 11일
Does the file consist of *one* line with *many* character strings of the format "hh:ss", which are separated by *one* space?
답변 (1개)
Walter Roberson
2012년 2월 11일
Do not use load() for this.
I do not know if importdata will work.
You can use textscan()
댓글 수: 4
Walter Roberson
2012년 2월 11일
We would need to know the format of the lines in order to show you the textscan() format. The link Elige posted should give you some ideas.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Export에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!