필터 지우기
필터 지우기

create date from three column vectors

조회 수: 1 (최근 30일)
Vanessa
Vanessa 2018년 4월 24일
댓글: Stephen23 2018년 4월 24일
Hello everyone,
I have three column vectors. The first one is the number of the day (double vector), the second one is the name of the month(cell vector eg. March) and the third one is the year (double vector).
How can I create a date combining these three vectors in format 2018-03-01?
Thank you Vanessa

답변 (1개)

Aletta Wilbrink
Aletta Wilbrink 2018년 4월 24일
편집: Aletta Wilbrink 2018년 4월 24일
Is this wat you want?
m = datevec(month,'mmmm');
d = datetime(year,m(2),day);
  댓글 수: 2
Vanessa
Vanessa 2018년 4월 24일
Thank you!!
Stephen23
Stephen23 2018년 4월 24일

This might be useful:

m(:,2)

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

카테고리

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