If
statement nested in a For
loop to check if a point passed a certain threshold value (I used the refractory period to be around the point at which I counted it as a "beat" which I determined to be anything below -800). Seeing that the SA node doesn't shoot another action potential until around 500 data points later (the EKG file was take at 500Hz, so that means, about one electric signal from SA node per second), I stayed on the safe side and incremented the i value (my For
loop counter) by 400. That being done, I then incremented my count
value which counts the number of beats. The rest was easy-peasy: multiply count
by (60/period specified by user in param).
The EKG:
First Channel:
Second Channel:
Indeed, there is a definite positive slope, so the drug, at least for those five minutes, elevated heart rate.
By the way, the graphs above, although for two different channels, have the exact same output of:
{55,57,58,60,62}
in regards to BPM.
No comments:
Post a Comment