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
 customized fitting

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
breiti Posted - 05/02/2005 : 05:30:08 AM
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$".
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 05/03/2005 : 10:33:43 AM
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
breiti Posted - 05/03/2005 : 09:14:11 AM
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.

Mike Buess Posted - 05/02/2005 : 2:51:42 PM
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

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