one of module call pitch.m as follow
f0 = pitch(sig1, fs, 'WindowLength', round(fs .* 0.05), 'OverlapLength', round(fs * (0.05 - 0.025)));
but coder failed to generate C/C++ code. error message as follow:
Failed to compute constant value for nontunable property 'WindowLength'. In code generation, nontunable properties can only be assigned constant values.

 채택된 답변

Walter Roberson
Walter Roberson 2021년 8월 18일

1 개 추천

You will need to have a switch statement on every fs that you wish to permit, each time calling with a hard-coded WindowLength. So for example you might have a branch for 8000, another for 11025, another for 12000, another for 22050, another for 24000, another for 44100, another for 48000, and so on.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 8월 18일

댓글:

2021년 8월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by