Matlab coder doesn't work with commands like try, { , so is there any way to fix it?

3 次查看(过去 30 天)
I was trying to convert the Matlab function ode45 to C++ but the Matlab coder has a problem with commands { and try code generation does not support variable "yout" size growth through indexing code generation does not support cell operation for varargin and varargout
And many other commands, Is there any way to solve theses issues?

回答(1 个)

sam0037
sam0037 2016-6-24
Hi
Refer to the following linkto know about Functions and Objects Supported for C and C++ Code Generation:
'ODE45' is supported for code generation with the following remarks/limitation as per the above link:
  • All odeset option arguments must be constant.
  • Does not support a constant mass matrix in the options structure. Provide a mass matrix as a function .
  • You must provide at least the two output arguments T and Y.
  • Input types must be homogeneous—all double or all single.
  • Variable-sizing support must be enabled. Requires dynamic memory allocation when tspan has two elements or you use event functions.

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by