How can I convert the bandpass function to C code?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Converting to Matlab Coder,
I get errors in bandpass, findpicks and smooth.
I would like to know a solution to this problem.
Or is there a function written in C code?
close all
clear all
[file,path] = uigetfile('*.txt');
ReadData=load(fullfile(path,file));
ChRaw=ReadData(:,1);
Fs=32;
t=(1/Fs):(1/Fs):TotalT;
fCh=ChRaw-ChRaw(1);
fCh1=bandpass(fCh,[0.1 1],Fs);
fCh2=bandpass(fCh,[0.5 1.5],Fs);
[pk,lc]=findpeaks(-fCh2,'MinPeakDistance',20,'MinPeakHeight',0);
RR=diff(lc)/Fs;
RR=RR(RR<2 & RR>0.5);
yy = smooth(RR,10);
HR=60./yy;
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!