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
 stat object and range limits in wks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

marko

Germany
112 Posts

Posted - 10/31/2002 :  06:26:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I have a worksheet with a lot of data.

I want to perform a quadratic fit using the stat object.

??? How can I limit the X range by labtalk ???

Of course, if the selection was made in the worksheet using the mouse, everything works fine. But how can labtalk tell the wks which range should be selected for further processing like this fit?

Marko

easwar

USA
1964 Posts

Posted - 10/31/2002 :  09:52:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Marko,

You can set the MKS1 and MKS2 system variables for each/any dataset from LabTalk. All operations such as fitting will then fit within the range specified by these variables. Note that you need to use the row index to set them.

For example,
mks1=10;
mks2=20;
will essentially set data markers at row index 10 and row index 20 for the active dataset.

Easwar
OriginLab.
Go to Top of Page

marko

Germany
112 Posts

Posted - 11/04/2002 :  03:44:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

You can set the MKS1 and MKS2 system variables for each/any dataset
...
Easwar
OriginLab.



Hi Easwar,

where do I find information about these global variables in the documentation? Neither searching in the HLP files nor in the manual revealed this functionality! Why isn't any description how to select ranges for fitting actions a standard issue in the manual? Should be, I guess!

Marko

Go to Top of Page

marko

Germany
112 Posts

Posted - 11/04/2002 :  06:43:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What else?

Just setting the mks variables alone is insufficient. One also has to select the column to fit separately by the script, otherwise the fitting wouldn't work.

Now it works, though it's strange that the stat object alone is not sufficient to fully control the fitting procedure. You have to know these mks1&2 variables and you need to know about the selection of the column. I always thought that object oriented design shouldn't let things like this come up... but... Looks like this is only in specific cases fulfilled. But fortunately Origin has this great forum where such problems mostly turn out to be solvable.

Thanks!

Marko

Go to Top of Page

Barb Tobias

USA
305 Posts

Posted - 11/05/2002 :  5:00:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Marko,
MKS1 and MKS2 are documented in the Programming Help file (Help:Programming) in Origin 7 SR2, and in the LabTalk Help file (Help:Programming:LabTalk) in pre-SR2 versions. Once you open the Help file, select the Index tab and type in "range". You should see the entry for these system variables.
-Barb

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