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.

 Risposta accettata

Stephan
Stephan il 8 Ott 2018
Modificato: Stephan il 8 Ott 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

Più risposte (0)

Categorie

Scopri di più su MATLAB Coder in Centro assistenza e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by