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!

 采纳的回答

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 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by