Undefined function or variable
이전 댓글 표시
Undefined function or variable 'Date2Num'. I am not sure whether this is due to a mix in coding from Python where Date2Num is used to convert date time objects to Matplotlib dates. What is the corresponding function in Matlab? Thanks in advance.
Error in VARToolbox_Primer (line 15)
datesnum = Date2Num(dates);
댓글 수: 7
Walter Roberson
2021년 1월 24일
MATLAB does not have native Matplotlib dates .
What is the input data type? What is the required output data type? Are you asking to convert datetime() objects to serial date numbers? If so, then datenum() applied to the datetime() objects.
economics student
2021년 1월 24일
Walter Roberson
2021년 1월 24일
What is done with datesnum ?
It looks to me as if you should likely use readtable() instead of xlsread()
economics student
2021년 1월 24일
Walter Roberson
2021년 1월 24일
What error message do you get with readtable()?
economics student
2021년 1월 24일
dpb
2021년 1월 24일
Date2Num is not builtin MATLAB function so looks like you're missing an m-file that went with the code you do have or if it is an attempt to use a Python function I believe you have to import it somehow--I've never done that so don't know the specifics.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!