showing hours elapsed not date and time data

조회 수: 1 (최근 30일)
Abbey Kirkman
Abbey Kirkman 2021년 2월 26일
댓글: Abbey Kirkman 2021년 3월 1일
hi so i am exporting data from excel :
however when i get the data into matlab it is given as serial numbers and when i use datestr to change it into time it doesnt give me the hours elapsed rather
[sorry for poor quality]
how can i get my data in matlab to look exactly like it was in excel so i can plot it against other values.

답변 (2개)

KSSV
KSSV 2021년 2월 26일
Let d be your datetime array.
d.Format = 'hh:mm:ss';
t = cellstr(d)
  댓글 수: 1
Abbey Kirkman
Abbey Kirkman 2021년 2월 26일
hi thank you so much for your reponse unfortunetly i get the following error

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


Steven Lord
Steven Lord 2021년 2월 26일
How are you importing this data from Microsoft Excel? See if the function or technique you're using to import the data can import it as a duration array not text or datetime.
  댓글 수: 1
Abbey Kirkman
Abbey Kirkman 2021년 3월 1일
hi i am using readmatrix to import my data. can readmatrix import data as a duration array?

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by