Undefined function or variable 'dct'

I'm trying to convert matlab code to C by using Matlab Coder. I got attached error message, "Undefined function or variable 'dct'." It's weird, because dct belongs to Matlab Coder supported function list in https://kr.mathworks.com/help/coder/ug/functions-supported-for-code-generation-alphabetical-list.html
Please explain why Matlab Coder cannot find dct function, and how to solve it. Thanks.

 采纳的回答

Stephan
Stephan 2018-10-8
编辑:Stephan 2018-10-8
Did you take notice of the limitations for code generation for dct function?
Usage notes and limitations:
C and C++ code generation for dct requires DSP System Toolbox™ software.
The length of the transform dimension must be a power of two. If specified, the pad or truncation value must be constant. Expressions or variables are allowed if their values do not change.
Also try:
which dct
That command should give a path back in which the function is installed.
If there is no result type:
ver
to find out what toolboxes are licensed and installed on your machine.
Signal Processing Toolbox and DSP System Toolbox should be part of the list.
I would expect you find the reason for your problem in one of these steps.
Best regards
Stephan

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB Coder 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by