error using codegen - 2021b

조회 수: 5 (최근 30일)
philip curran
philip curran 2021년 11월 25일
댓글: Walter Roberson 2021년 11월 25일
having difficulty turning my trained AC agent into C or C++ code, i have generated a policy function for the agent. here is the code used and the error produced:
cfg = coder.config('mex');
cfg.TargetLang = 'C++';
cfg.DeepLearningConfig = coder.DeepLearningConfig('none');
argstr = '{ones(1,19,1)}';
codegen('-config','cfg','evaluatePolicy','-args',argstr,'-report');
Undefined function 'codegen' for input arguments of type 'char'.
Error in workflow (line 153)
codegen('-config','cfg','evaluatePolicy','-args',argstr,'-report');
i am using matlab 2021b, any help would be greatley appreciated.
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 11월 25일
Question: did you upgrade versions in the last two days? You were using an earlier MATLAB version in your Trading Toolbox question?

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

채택된 답변

Walter Roberson
Walter Roberson 2021년 11월 25일
you need to have MATLAB Coder installed and licensed.
Note: MATLAB Coder is not available for Student licences.
  댓글 수: 1
philip curran
philip curran 2021년 11월 25일
thanks walter, that's fixed the issue

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by