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
 NLF Problems with more than 1 independend variable

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
DataConv Posted - 08/23/2011 : 10:38:35 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.0G SR1
Operating System: W7x64 SP1

I have some problems with the NLF fit function and scripting when having a multivariant formula. The code so far
nlbeginr (1,2,3) func:=FitMag2D nltree:=tt option:=init_all;
nlfit;
nlend;
ra1[1]=tt.x0; ra1[2]=tt.y0; ra1[3]=tt.A; ra1[4]=tt.B; ra1[5]=tt.c;
ra1[7]=tt.e_x0; ra1[ 8]=tt.e_y0; ra1[9]=tt.e_A; ra1[10]=tt.e_B; ra1[11]=tt.e_c;
works for me (ra1 is a range pointing to a column storing the fit parameter). FitMag2D is a fit function with two independent variables (X and Y) and 5 parameters (x0,y0,A,B,c). Now i want the Z=f(X,Y) values in another column. When using the GUI - no problem. On scripting, i however got stuck. I found the function 'fit' which should do my task. Unfortunately, it is designed for one independend variable? The doc lacks here a bit... The old NLSF enviroment is hidden somewhere in the doc and also not that clear to me...
What i want to have: Using col(1) and col(2) as X and Y and the parameters determined by the fit and put that as Z=f(X,Y) in another column. How to?
1   L A T E S T    R E P L I E S    (Newest First)
DataConv Posted - 08/24/2011 : 07:58:13 AM
Ok... the solution was quite simple:
rb1=nlf_FitMag2D(r1,r2,tt.x0,tt.y0,tt.A,tt.B,tt.c);
With rb1 pointing to the target column (the Z values)
r1 pointing to the column with the X values and
r2 pointing to the column with the Y values.
Sometimes things turn out simple if you do a break...

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