Info

此问题已关闭。 请重新打开它进行编辑或回答。

I have tried to compile C code from Matlab using Matlab coder, but it turns out that Matlab functions we are using now “fitensemble” and “predict” are not supported by Matlab coder.

1 次查看(过去 30 天)
I have tried to compile C code from Matlab using Matlab coder, but it turns out that Matlab functions we are using now “fitensemble” and “predict” are not supported by Matlab coder.
MATLA version 2013a Compiler : [1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0

回答(2 个)

Fred Smith
Fred Smith 2014-1-17
For functions that do not have code generation support your options are:
  • Use a C/C++/Fortran library and use custom C code integration (coder.ceval) to bring it into MATLAB for code generation purposes.
  • Use a MATLAB Coder compliant version written in MATLAB.
  • If you don't actually need standalone code and this isn't the bottleneck you are trying to speed up, you can always call the version in MATLAB using coder.extrinsic.
There are multiple ways you might obtain such code (C or MATLAB):
  • Write it.
  • Find a preexisting version that someone else has written.
  • Pay or cajole someone into writing it for you.
  • Wait until MathWorks gets around to supporting these functions.

Walter Roberson
Walter Roberson 2014-1-15
Correct.
You can write the C version of the routines yourself, or you can rewrite your MATLAB code so it does not call upon those routines.
Or you can pay Mathworks a lot of money to allow those routines to be compiled. The base rule that I use in these matters is that $US 1 million will probably buy you a meeting to negotiate pricing.

此问题已关闭。

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by