HI, can someone post the complete code on how to filter heart beat signal and ge
ID: 2248807 • Letter: H
Question
HI,
can someone post the complete code on how to filter heart beat signal and get a heart beat i have the code on how to get the data but i dont know what to do next
d = daq.getDevices;
s = daq.createSession('ni');
s.rate = 1000;
s.DurationInSeconds = 5;
addAnalogInputChannel(s,'myDaq1','ai0','Voltage')
data = startforeground(s);
plot(data);
this is the code and the project requirements are
1.The heart rate monitor should display the BPM (beats per minute) value in MATLAB environment and allow users to store the BPM recordings. The heart rate measurement should be as accurate as possible and its reading should be updated no less frequently than once every five seconds for live tracking users’ heart rate.
Explanation / Answer
s=daq.createSession('ni'); s.addAnalogInputChannel('cDAQ1Mod2', 0, 'voltage'); s.Rate=2000; s.DurationInSeconds = 60; lh = s.addlistener('DataAvailable', @plotData); function plotData(src,event) plot(event.TimeStamps, event.Data) end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.