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
 masking 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
ovince Posted - 05/08/2006 : 7:18:17 PM
hi everybody,

when plotting a dataset I see 4 data that I would like to exclude
from analysis. I would like to do it using Origin C or LabTalk. How to do it?

thanks
oliver
9   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 05/10/2006 : 08:38:15 AM
Hi Oliver,

This shows how to create a fit curve with the stat object...

stat.reset();
stat.data$=dataset name;
stat.fitxdata$=wks_Xname; // X dataset for fit curve (column must already exist)
stat.fitydata$=wks_Yname; // Y dataset for fit curve (column must already exist)
stat.makeX.fitnpts=fit_points; // number of points in fit curve
stat.makeX.fitX1=lower_limit; // lowest X-value on fit curve
stat.makeX.fitX2=upper_limit; // highest X-value on fit curve
stat.makeX(); // create X values for fit curve
stat.lr(); // perform fit and create Y values
%A=stat.fitydata$;
lay -i200 %A; // plot fit curve in active graph layer

You can also use the nlsf object which will obtain the parameters you want (and many more), supports masking and can draw the fit curve.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/10/2006 10:00:15 AM
ovince Posted - 05/10/2006 : 05:51:58 AM
hi,

What I am trying to do is to analyse a large number of data sets.

1. For each data set I should calculate Coeff of Linear Correlation and Standard Deviation.

2. The data should be plotted together with the fitted curve in order to analise it by eye.

3. If the fit is not good to remove some data.

For this task I have used lr.r and lr.stat because it automaticaly plots the fitted curve.

With stat feature and fitpoly I cannot find how to do it. Could you help me?


oliver
larry_lan Posted - 05/10/2006 : 05:34:23 AM
Hi Olive:

Sorry, it should be

stat.data$=datasetname;

to specify a dataset.

If you using OriginC, maybe you can use fitpoly() function to do the fitting directly. like:

void test()
{
Curve crv("Data1_A","Data1_B");
double coeff[2];
fitpoly(crv, 1, &coeff);
}


Edited by - larry_lan on 05/10/2006 05:41:06 AM
ovince Posted - 05/10/2006 : 05:12:39 AM
hi,

fals alarm...it works with LT_execute? If the data is plotted in an active graph window, lr adds the data plot of the fitted curve to the graph window. This is not the case with stat. What to do?
oliver
ovince Posted - 05/10/2006 : 04:44:24 AM
Hi,

Do you know how to include these commands

stat.dataset$=datasetname;
stat.lr();
stat.r=;
stat.sd=;

into Orugin C? I have tryed with LT_execute() but does not work

oliver
larry_lan Posted - 05/09/2006 : 07:54:06 AM
Hi Oliver:

If you want to do linear fitting, you can use the stat.lr() command, lr dataset command will not exclude the masked data.

stat.dataset$=datasetname;
stat.lr();
stat.r=;
stat.sd=;

Then you can get the proper correlation coefficient and standard deviation.

Larry
OriginLab GZ Office
ovince Posted - 05/09/2006 : 02:29:06 AM
hi,

I have masked 4 data in Origin C by typing:

LT_set_str("%R", nameForLT); //nameForLT is the dataset name
LT_execute("%R<16>=1");
LT_execute("%R<466>=1");
LT_execute("%R<1089>=1");
LT_execute("%R<1561>=1");

I tought it works because the bad data were colored into red. But comparing analysis with masked and unmasked data (correlation coefficient and standard deviation) one can notice that the data were NOT really excluded from analysis. What whould be the next step?

oliver
ovince Posted - 05/09/2006 : 02:08:06 AM
thanks Mike...it works

oliver
Mike Buess Posted - 05/08/2006 : 8:59:32 PM
Hi oliver,

You can mask/unmask point (row) i in a dataset with the LabTalk command dataset<i>=n, where n=1 (mask) or 0 (unmask).

Mike Buess
Origin WebRing Member

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