from cell to date

조회 수: 141 (최근 30일)
Johannes Deelstra
Johannes Deelstra 2017년 7월 3일
답변: Guillaume 2017년 7월 4일
I have a cell variable 201624x1 with values for date from '01/01/1994 01' until '01/01/1994 01' How do I convert these into Matlab dates
Thanks
  댓글 수: 3
Johannes Deelstra
Johannes Deelstra 2017년 7월 3일
sorry this was wrong. the time series starts at 01/01/1994 01 in which the 01 is 1 o' clock and ends at 31/12/2016 23 in which 23 is the 24 hrs midnight
per isakson
per isakson 2017년 7월 4일
편집: per isakson 2017년 7월 4일

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

채택된 답변

Guillaume
Guillaume 2017년 7월 4일
datetime(yourcellarray, 'InputFormat', 'dd/MM/yyyy HH')

추가 답변 (1개)

Anushi1998
Anushi1998 2017년 7월 4일
Use strfun and datetime functions for conversion
  댓글 수: 1
Guillaume
Guillaume 2017년 7월 4일
You probably mean cellfun. There is no strfun in base matlab. In any case, datetime can directly operate on a cell array so cellfun would not even be needed.

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

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by