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
 Extracting Masked data

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
ravinder Posted - 10/21/2004 : 1:43:54 PM
Origin Version 7 (Select Help-->About Origin):
Operating System: XP
Dear Friends,
I have a two-column (X,Y) data in origin worksheet. Some of the data is masked. I want to know if it is possible to write a Labtalk script that can extract the masked data and put in a new worksheet??
Regards,
Ravi
4   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 11/12/2004 : 2:23:22 PM
There is a user interface for extracting data and there is a trivial way to know if a value is masked or not ...

Activate the worksheet with the dataset which has missing values.
Select Analysis : Extract Worksheet Data from the menu.
To get all the rows in the worksheet where values are masked in column A, enter this as the formula :
col(A)<i>==1
and click Do It.

The same way
col(A)[row]
can be used to read/write a worksheet cell, you can use
col(A)<row>
to read/write a cell's masked state.
1 = masked, 0 = not masked


ravinder Posted - 10/22/2004 : 12:52:05 AM
Dear Eswar,
Thanks a lot. It works!!!
Regards,
Ravi
easwar Posted - 10/21/2004 : 2:31:46 PM
Hi Ravi,

The following is just a simple/crude script segment - modify/expand as needed - this looks at the 1st col of active worksheet, and then creates a new worksheet and copies over all masked rows of 1st col from source to new destiation sheet.

To execute, copy all lines and paste in script window, highlight all lines, and hit enter (click on source worksheet to make it the active window before doing this)

Easwar
OriginLab


// Get number of rows in current sheet
irows = wks.maxrows;
// Save name of current sheet in %a variable
%a=%h;
// Create a new sheet
win -t;
// Initialize counter
inum = 1;
// Loop over all rows of source sheet
for(ii=1; ii<=irows; ii++)
{
// If cell in 1st col is masked...
if( 1 == ismasked(ii, %(%a,1)) )
{
// Copy over to destiation
%(%h,1,inum) = %(%a,1,ii);
// Update counter
inum++;
}
}



easwar Posted - 10/21/2004 : 2:07:04 PM
Hi Ravi,

If you look in LabTalk help files, you will find IsMasked() and FindMasks, which can be used to determin which rows/indices of a dataset are masked, and so that information can be then used to extract to a new sheet etc.

Easwar
OriginLab


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