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.

Réponses (0)

Catégories

En savoir plus sur General Applications dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by