The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Delete last column

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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));

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000