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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Removing every second column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

alaudo

Germany
Posts

Posted - 07/30/2005 :  08:08:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 6.5
Operating System: Win XP

I have datasets where every second column (starting from 3: 3,5,7,9) contains rubbish data.
Is there a quick way to remove these columns from dataset?

Mike Buess

USA
3037 Posts

Posted - 07/30/2005 :  09:07:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
for(i=2;i>1;i++) {
if( i>=wks.ncols ) break;
del wcol(i+1);
};

Mike Buess
Origin WebRing Member
Go to Top of Page

chmickey

China
Posts

Posted - 08/01/2005 :  1:23:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
how to use this codes

thanks
mickey
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 08/01/2005 :  1:55:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mickey,

One-time use...
1. Show the script window (Window > Script Window).
2. Select the code in my previous post and copy (Ctrl+C).
3. Place cursor in script window and paste (Ctrl+V).
4. Select code in script window and press Enter.

If you need to use it many times you can run the script from the Custom Routine button. See the final post in this topic...
http://www.originlab.com/forum/topic.asp?TOPIC_ID=4043

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000