Issues during conversion into C++

Hi everyone,
I'm having troublesome time during the conversion of this function into C++ - readable code
function [b,a] = ComputeButterworthCoeffs(fs, order, type, fc, flow, fupp)
fn = fs/2;
oc = fc/fn;
olow = flow/fn;
oupp = fupp/fn;
if strcmp(type,'bandpass') || strcmp(type,'stop')
if olow>1 || oupp>1
error('Upper and lower frequencies must be BOTH lower than Nyquist frequency')
end
[b,a] = butter(order, [olow oupp], type);
else
if oc>1
error('Cut frequency must be lower than Nyquist frequency')
end
[b,a] = butter(order, oc, type);
end
end
These are the errors I get, they all refer to the 'butter' function call:
Schermata da 2018-11-26 14-51-10.png
What am I doing wrong?
Is there some link dealing with the same issue?
Thanks in advance.

답변 (0개)

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

질문:

2018년 11월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by