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 for Programming
 LabTalk Forum
 customized fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

breiti

Austria
Posts

Posted - 05/02/2005 :  05:30:08 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7
Operating System: XP

I've designed a code for quicker working with regressions of my datas. I'm working with a variables to have the greatest posibilities. The datas of the polynom should be stored in the same worksheet as the original datas:

######################################

%t = %(1,@w); //selected worksheet

%w = %(%r,@col,selc1); //selected y-column

%j=fitx%w; //x-column for polynom
%k=fity%w; //y-column for polynom
work -v %j; //
work -v %k; //

win -a %t; //Chanke to worksheet
stat.reset(); //Reset
stat.pr.order = polgrad;
stat.data$ = %t_%w; //Datas
stat.fitxdata$ = %t_%j; //
stat.fitydata$ = %t_%k; //
stat.makex.fitnpts = fitpunkte; //
limit %t_%w; //MIN and MAX
stat.makex.fitx1 = limit.xmin; //startpoint
stat.makex.fitx2 = limit.xmax; //endpoint
stat.makex(); //
stat.pr(); //start

####################################################

The problem is, that the variable "stat.data$" is always epmty. I can't define "stat.data$".

Mike Buess

USA
3037 Posts

Posted - 05/02/2005 :  2:51:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Your first two lines are confusing. My initial reaction is that it only makes sense if %r and %t are the same (wks), but it's hard to see what you're really trying to do. Could you elaborate?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/02/2005 2:52:45 PM
Go to Top of Page

breiti

Austria
Posts

Posted - 05/03/2005 :  09:14:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Maybe it's better to add some more information:
The sense of my script is to put the fitting datas in the same wks than the originals are.

My approach is:
1. I'm plotting the graph
2. I'm starting the script to make my fit.

Because the script is changing between graph and wks, I have to store the name of the wks. I'm doing this with "%t".
With "%w" I'm catching the y-datas.

Hope this will help.

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 05/03/2005 :  10:33:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can get the worksheet and column names from the string variable %C which always holds the name of the active dataset. (If your graph has more than one plots the active plot is checked at the bottom of the Data menu.) Try this...

%A = %C; // active dataset
%t = %[%A,'_']; //selected worksheet
%w = %[%A,>'_']; //selected y-column

%j=fitx%w; //x-column for polynom
%k=fity%w; //y-column for polynom;

win -a %t; // wks must be active to add columns
work -v %j; //
work -v %k; //
stat.reset(); //Reset
stat.pr.order = polgrad;
stat.data$ = %A; //Datas
stat.fitxdata$ = %t_%j; //
stat.fitydata$ = %t_%k; //
stat.makex.fitnpts = fitpunkte; //
limit %A; //MIN and MAX
stat.makex.fitx1 = limit.xmin; //startpoint
stat.makex.fitx2 = limit.xmax; //endpoint
stat.makex(); //
stat.pr(); //start

Mike Buess
Origin WebRing Member
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