Issues during conversion into C++
Show older comments
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:

What am I doing wrong?
Is there some link dealing with the same issue?
Thanks in advance.
Answers (0)
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!