Function 'daysact' not supported for code generation.
显示 更早的评论
I am using this simple code inside a user defined Matlab function in SIMULINK
NumDays = daysact('20-March','21-March');
But it shows error that "Function 'daysact' not supported for code generation."
采纳的回答
更多回答(1 个)
Sean de Wolski
2021-1-14
You should use the newer and recommended datetime / duration classes which support c-codegen:
d = days(datetime(t1)-datetime(t2));
类别
在 帮助中心 和 File Exchange 中查找有关 Fixed-Point Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!