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.
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.
03-01-2009 12:17 PM
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
03-01-2009 12:27 PM
03-01-2009 12:58 PM
sorry
03-01-2009 02:21 PM - edited 03-01-2009 02:25 PM
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.
03-01-2009 02:39 PM
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
03-02-2009 04:12 AM - edited 03-02-2009 04:13 AM
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
02-11-2012 12:41 PM
hi could you please tell me what is your suggestion for solving the problem