from cell to date
이전 댓글 표시
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
Jan
2017년 7월 3일
It depends on what "from '01/01/1994 01' to '01/01/1994 01'" means. Why are the two strings equal and what is the trailing "01"?
Johannes Deelstra
2017년 7월 3일
per isakson
2017년 7월 4일
편집: per isakson
2017년 7월 4일
- See Represent Dates and Times in MATLAB
- See Convert Between Datetime Arrays, Numbers, and Text
- What do you mean by "Matlab dates" ? An array of serial date numbers or a datetime array.
- Either 00 through 23 or 01 through 24. I prefer the former because 24 will automatically be converted to 00 of the following day.
채택된 답변
추가 답변 (1개)
Anushi1998
2017년 7월 4일
0 개 추천
Use strfun and datetime functions for conversion
댓글 수: 1
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.
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!