problem in generating standalone c/c++ code

조회 수: 3 (최근 30일)
Venkat R
Venkat R 2015년 7월 29일
댓글: Walter Roberson 2015년 7월 30일
Hi
I am using Matlab R2013a. My line in a function is
coder.extrinsic('autocorr');
acf = autocorr(aX,[],2);
The function passed 'Check Code Generation for readiness'.
I want to generate c/c++ code for my function. After building a project, passing this function, defining the input data types, and then using BUILD for C/C++ STATIC LIBRARY output, I am getting error as follows
??? The extrinsic function 'autocorr' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated because its outputs appear to influence the calling function. Fix this error by not using 'autocorr' or by ensuring that its outputs are unused

채택된 답변

Walter Roberson
Walter Roberson 2015년 7월 29일
Mathworks does not provide generated code for autocorr. See http://www.mathworks.com/help/coder/ug/functions-supported-for-code-generation--alphabetical-list.html You will need to define your own autocorr routine if you want to use generated C/C++ code.
  댓글 수: 2
Venkat R
Venkat R 2015년 7월 30일
But I am also getting similar error rerpot for using 'std','kurtosis','iqr' functions that are supported by the Matlab link
Walter Roberson
Walter Roberson 2015년 7월 30일
kurtosis and iqr were added in R2013b, the version after you have. See http://www.mathworks.com/products/new_products/MATLAB-Coder-R2013b.pdf

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Generating Code에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by