How can I convert the bandpass function to C code?
Afficher commentaires plus anciens
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;
Réponses (0)
Catégories
En savoir plus sur Smoothing and Denoising 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!