From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking to calculate the peaks and bpm of an ecg signal

Hello,

i was hoping some one could tell me what i am doing wrong. i have an ecg in the form of a text file. i am trying to display that ecg signal, show the peaks and then calculate the bpm. as you can see the program aint working. the messages on the forum all use continuouslly acquired signals. cant seem to find anything with a signal from a file.

thanks

barry

0 Kudos
Message 1 of 7
(4,287 Views)
If you are having problems reading a file, don't you think it's important to also attach the file?Smiley Wink
0 Kudos
Message 2 of 7
(4,286 Views)

sorry

Download All
0 Kudos
Message 3 of 7
(4,277 Views)

I think the problem is that you are working with a 2-D array, but it only truly has 1 column of data.  When you index out the data, you are taking the first row rather than the first column.  You could eliminate the for loop and just use index array to get the first column right away, then continue on with that.

 

Your .xls file attachment is not truly an Excel file.  It is a bad idea to give it an .xls extension when it is not an Excel file.  It just leads to confustion.  It is truly a text file, so call it a .txt file, but it has some HTML type stuff appended ot the beginning and end.  What ever program created this text file did not create a clean version of it.  As a result, the HTML rows get converted to some extra zeroes in your data.

Message Edited by Ravens Fan on 03-01-2009 03:25 PM
Download All
0 Kudos
Message 4 of 7
(4,262 Views)

hello,

thanks for your help. yeah it is a text file, but this forum would not let me attach that type of file.

have the ecg signal running now but still no peaks or bpm showing on the graphs. any theories?

thanks

barry

0 Kudos
Message 5 of 7
(4,251 Views)

Let us asume that your peak detection is correct. Then the first beats pr second will be ->1/(( peak postion(1)-peak postion(0) )*dt),

and the next  1/(( peak postion(2)-peak postion(1) )*dt). This should be a job for a for loop ;). Multiply by 60 to get bpm 

Message Edited by t06afre on 03-02-2009 11:13 AM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 7
(4,211 Views)

hi could you please tell me what is your suggestion for solving the problem

 

0 Kudos
Message 7 of 7
(3,378 Views)