Version: 220.127.116.11, English, Calc
Ubuntu 13.10, English
I am working on some science fair stuff and I have respiration data that was taken by a relative pressure sensor that was connected to a bladder that was strapped around the test subjects’ stomachs. As they inhaled, they created pressure against the bladder raising the pressure readout and vice versa, which created a somewhat harmonic wave (I’ve attached a graphic). I need to write a function that will calculate the average frequency of troughs or breaths. Something that could perhaps take the frequency of two or so troughs in front and behind the one in question and average them to give a breath frequency. Does anyone know how to write such a thing?
Someone on another forum said this:
“I would approach this by creating a new pair of data columns that indicate each peak and trough point using basic less-than / greater-than comparisons of a prior value (or perhaps 3 prior readings for noise smoothing purposes). It should then be possible to determine each period and display these in another column. These periods can then be averaged as required in the moving 5-period manner indicated (again in a new column) and graphed as required.”
I didn’t understand that. I’ve attached a file of some sample data. Data Sample.ods Feel free to edit, alter and otherwise play with it if it helps. It will certainly help me if you can return a file that has an example of what you’re saying.