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
 Origin Forum
 How to delete invalid data in batch?

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
Younger2008 Posted - 03/05/2006 : 12:58:12 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System: 2000

I got datasheet with several columns sorted as XYXYXY...
but for some cases the X value exist while Y value doesn't exist instead of a dash symbol (-) in worksheet, if I use line+symbol style to plot data, the line to connect the symbols is not continuous because the invalid data I mentioned are also plotted.
So how to delete the invalid data (both X and Y) in batch?

Thanks
Younger
6   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 03/06/2006 : 11:43:50 AM
FYI, select all lines and press Enter to execute from the script window.

Mike Buess
Origin WebRing Member
Younger2008 Posted - 03/06/2006 : 11:14:43 AM
It works. I save the code into a Custom.ogs file and it's ok!
Many thanks!!!
Younger2008 Posted - 03/06/2006 : 10:56:56 AM
I copy the code to script window and cannot execute them. What's the problem?

Sorry I have no experience on programming in Origin.
Mike Buess Posted - 03/06/2006 : 08:49:19 AM
Younger, try this while your XYXYXY... worksheet is active.

sort.wksname$=%H;
sort.missing=1; // treat missing values as largest
for(ii=1;ii<wks.ncols;ii+=2) {
%A=wks.col$(ii).name$;
%B=wks.col$(ii+1).name$;
get col(%A) -e nrow; // # of rows
sum(col(%B));
nval=sum.n; // # of (non-missing) values
sort.c1=ii;
sort.c2=ii+1;
sort.r1=1;
sort.r2=nrow;
sort.cname1$=A: %B;
sort.wks(); // move missing values to bottom
sort.r2=nval;
sort.cname1$=A: %A;
sort.wks(); // restore order of non-missing values
wo -s ii nval+1 ii+1 nrow; // select missing values and their Xs
menu -e 36442; // execute Edit > Delete
};

Mike Buess
Origin WebRing Member
Younger2008 Posted - 03/06/2006 : 06:40:35 AM
Thanks, Mike!
It really does work.
But is there a command to remove dash(-) in worksheet? This will make the worksheet look nice.

Regards,
Younger

Edited by - Younger2008 on 03/06/2006 06:41:41 AM
Mike Buess Posted - 03/05/2006 : 2:46:23 PM
Hi Younger,

page.connect=1 will connect the points on both sides of the missing value(s).

Mike Buess
Origin WebRing Member

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