Author |
Topic  |
|
ViRgiLiO2007
Spain
Posts |
Posted - 05/04/2008 : 8:36:02 PM
|
Origin Version (Select Help-->About Origin): 7.5 SR6 Operating System: Windows XP SP2
Hi all. This is my first post to the forum. I'm conducting a clinical research about aortic blood flow variations during mechanical ventilation and I just need a little help of you. I have a worksheet called DATA with two Y columns: Aortic blood flow velocity (ABFv) and Aortic diameter (AoD). The last one (AoD) was measured by echo in different frequency and intervals than aortic blood flow velocity, so there are less values in AoD than in ABFv. The question is: Assuming that AoD didn´t change in empty cells, I need to create a new column (called aortic blood flow, ABF), using this operation: ABFv * (AOd^2/4), and in the case that AoD cell is empty, to use the last AoD value for calculation.
I'll try to explain:
Supose my worksheet is something like this:
ABFv AOd 2 1.5 2.5 2.6 2.7 1.2 2.3 2.1 1.9 1.1
And I want to obtain this one (ABF x AoD, to simply calculations):
ABFv AOd ABF 2 1.5 3 2.5 3.75 2.6 3.9 2.7 1.2 3.24 2.3 2.76 2.1 2.52 1.9 1.1 2.09
I was using the last AOd value to calculate ABF (ABFv*AOd) when there is not AOd value in the cell.
I'm not an expert using Origin, and I will be very grateful with your help.
Thanks in advance.
Dr. M. Ignacio Monge García Intensive Care Unit, Hospital de Jerez |
|
ViRgiLiO2007
Spain
Posts |
Posted - 05/05/2008 : 04:05:36 AM
|
Live Chat support made the trick. Awesome support, really.
The script is:
wks.addcol(); get %(%h,2) -e end; value = %(%H,3,2); loop(ii,2,end){
%(%H,4,ii) = %(%H,2,ii) * value;
if(%(%H,3,ii+1) != 0/0) value = %(%H,3,ii+1);
} |
 |
|
|
Topic  |
|
|
|