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
 How can I deleted the many "masked" data points?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

YTian

1 Posts

Posted - 11/09/2009 :  04:07:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8 SR1
Operating System:Windows XP

Dear all,
I have a huge amount of data points and some are "masked". Now I need to copy the unmasked data to Excel to do some calculations with VBA (I occasionally use Origin C but I am inclined to use VBA in this particular case because I am not familiar enough with Origin C to code complex program).
So, how can I delete the "masked" points or only copy those "unmasked"?
I know there is a tool in the Menu to delete data points: Data->Remove Bad Data Point. Unfortunately it seems that it can only delete points one by one. Does Origin have any good method to delete many data point sjust like the masking tool?
I looked up in the program help and noticed there is a "IsMasked" command in LabTalk. I could not make it running as I have no idea about the programming with LabTalk.
Any comments to this question is appreciated.
regards with thanks
YTian

greg

USA
1379 Posts

Posted - 11/09/2009 :  11:27:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The Worksheet menu in 8.1 has the Reduce Rows option which can be used to delete rows by multiple methods - including Delete rows with masked values. Like most X-Functions, you can save a Theme and make Delete rows with masked values part of your menu.

In version 8 you can use the Extract Worksheet Data tool to delete the rows where masked values are found or create a new worksheet with just the unmasked values using a number of steps.

Select Worksheet : Extract Worksheet Data...

To Delete:
Select the column with Masked values (presumably your Y column)
Click the => button to create an Alias (in this example : B)
In the Condition text box, type
B<i>!=0
Click Test -- select if true button
(This causes only those rows with masked values to be selected.)
Click the Close button
Select Edit : Delete from the menu (NOT the Delete key)
All rows with masked values are removed.

To Copy:
Select the column with Masked values (presumably your Y column)
Click the => button to create an Alias (in this example : B)
In the Condition text box, type
B<i>==0
Select 'Extract to New Workbook' as Output
Click OK
New Workbook will contain only those rows without masked values.


Edited by - greg on 11/10/2009 09:33:18 AM
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/05/2022 :  01:23:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OriginPro 2022b (64-bit) SR1 9.9.5.167
Windows 7 Pro SP1 x64

Greetings!

I have a variable number of masked cells in a worksheet:


How do I select and delete all the masked points (not rows) at once?

http://blog.originlab.com/extract-masked-points-to-a-new-workbook-automatically explains a way to select masked cells for two columns only by using isMasked(i,Y) in Worksheet: Worksheet Query…. However, it is unclear what to do if I have many columns.

---
Andrey
Go to Top of Page

Echo_Chu

China
Posts

Posted - 07/05/2022 :  02:14:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Andrey


Please work with labtalk to do what you need. For example, the scripts below are to delete the masked values from the first 4 columns.

for(ii=1; ii<=4; ii++)
{
wreducerows irng:=wcol($(ii)) method:=mask;
}


Echo
OriginLab Technical Service
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/05/2022 :  02:22:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Echo_Chu

Hi, Andrey


Please work with labtalk to do what you need. For example, the scripts below are to delete the masked values from the first 4 columns.

for(ii=1; ii<=4; ii++)
{
wreducerows irng:=wcol($(ii)) method:=mask;
}

Echo
OriginLab Technical Service



Dear Echo,

The script removes rows, but I need to delete masked values only while keeping the original rows intact.

---
Andrey
Go to Top of Page

snowli

USA
1426 Posts

Posted - 07/06/2022 :  12:59:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

Highlight those columns and right click to choose Set Multiple Column Values...

Enter
if(wcol(j)<i>!=1, wcol(j), --)


It will turn all those cells with mask with --.

It still shows them as masked but u can highlight all those columns and click Unmask Range toolbar button.

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/06/2022 :  1:38:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

if(wcol(j)<i>!=1, wcol(j), --)

Thanks, Snow



Dear Snow,

What does this syntax mean?
Where do I read more about this syntax?

---
Andrey
Go to Top of Page

snowli

USA
1426 Posts

Posted - 07/06/2022 :  3:26:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

See https://www.originlab.com/doc/LabTalk/ref/Datasets#Masking_Cells

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/11/2022 :  06:42:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

See https://www.originlab.com/doc/LabTalk/ref/Datasets#Masking_Cells

Thanks, Snow



Dear Snow,

Got it.
Thanks.

---
Andrey
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