Codegen respond with an error: "??Expected a character vector. "
조회 수: 5 (최근 30일)
이전 댓글 표시
When I use my training results of DDPG model to generate GPU code, there always respond an error. I followed the instruction "Deploy Trained Reinforcement Learning Policies" from help document, and it runs well in other exmples. Here is error report:
And return code:
>>codegen('-config','cfg','evaluatePolicy','-args',argstr,'-report');
??? Expected a character vector.
Code generation failed: View Error Report
Incorrect use of codegen
댓글 수: 7
답변 (1개)
Paras Gupta
2024년 6월 21일
Hello Haonan,
I understand that you're encountering the error "??? Expected a character vector."
This issue could arise if the name of the specified MAT-file or the absolute file path to the MAT-file contains non-ASCII characters, which are not supported by codegen. Please refer to the 'Limitations' section of the following documentation.
You can also refer to the below documentation for more information on character encoding in code generation:
Hope this resolves the query.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!