T O P I C R E V I E W |
hkkim |
Posted - 01/11/2013 : 03:22:48 AM Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.1 SR3 Operating System: Windows XP
Hello!
I want to get an integral area ratio between two graphs. But I don't want to add these integrated columns to a worksheet.
1. I tried to remove these columns using 'x2' variable but did not work(<== in below code). Why? 2. If you have a better way to implement this function please let me know it. 3. If the numbers of two columns are not same I want to integrate until the smaller one. Is there any good way for it?
Thank you so much. Have a nice weekend!
hkkim
-------------------------------------------------------------------------------------- integ1 iy:=col(2) type:=abs plot:=0 area:=0; area1=integ1.area; area1=; integ1 iy:=col(4) type:=abs plot:=0 area:=0; area2=integ1.area; area2=; area2/area1=;
AREA1=1034.721 AREA2=1055.41542 AREA2/AREA1=1.02
x2=; X2=6 del col(x2); #Command Error! <== ??
del col(6); del col(5);
|
2 L A T E S T R E P L I E S (Newest First) |
hkkim |
Posted - 01/14/2013 : 12:48:35 AM Hi, Greg!
I have resolved all my questions with your help. Thank you so much! |
greg |
Posted - 01/11/2013 : 2:59:53 PM To answer the question posed by your topic ...
del wcol(wks.ncols); // Deletes the last column del wcol(x2); // This deletes the LAST VISIBLE COLUMN IN YOUR WORKSHEET (so do not use it)
The COL( ) function expects a column name or a number and 'X2' is neither. The WCOL( ) function I used above always expects a number so when it encounters something that is not a number, it assumes it is a variable that must be interpreted to get the number.
Here is a variant that uses COL( ) along with wks.ncols property:
del col($(wks.ncols));
|