MATLAB Answers

Undefined operator './' for input arguments of type 'cell'.

1 view (last 30 days)
NN
NN on 23 Apr 2021
Commented: Scott MacKenzie on 23 Apr 2021
Hi , i am using the below command and getting the error:
date_num2 = datenum(testdates)+table2array(Data(1:end,2))./24;
Error
Undefined operator './' for input arguments of type 'cell'.
please help
  3 Comments
Scott MacKenzie
Scott MacKenzie on 23 Apr 2021
NN, you didn't say anything about the organization of the Data table. The problem, it seems to be, is that the 2nd column of the Data table likely contains text. The array2table function therefore produces a cell array of character strings. Hence the error message.
If the 2nd column of the Data table contains numeric data, the array2table function would yield a numeric vector and there would be no error message.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by