Undefined function or variable 'dct'
3 views (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Stephan
on 8 Oct 2018
Edited: Stephan
on 8 Oct 2018
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 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!