Undefined function or variable 'dct'

3 views (last 30 days)
ByungKeon Ko
ByungKeon Ko on 8 Oct 2018
Edited: Stephan on 8 Oct 2018
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.

Accepted Answer

Stephan
Stephan on 8 Oct 2018
Edited: Stephan on 8 Oct 2018
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

More Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!