Error using datevec function with trial version

Hello, i am using a trial version of matlab (i'm a student) and i want to use the 'datevec' function to convert date and time to vector of components. I have imported a data file in 'cell array' format but i have a error message
Error using datevec (line 103) The input to DATEVEC was not an array of character vectors. My friend tried exactly the same code but hasn't a trial version, and it worked out...
Could someone help me out?
Thnak you for your help!

 채택된 답변

Walter Roberson
Walter Roberson 2017년 4월 1일

0 개 추천

I speculate that uiimport might be returning string() objects rather than cell array of characters. It would not surprise me if datevec does not accept the new string objects.
Try
datevec( cellstr(A))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Calendar에 대해 자세히 알아보기

질문:

2017년 4월 1일

댓글:

2017년 4월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by