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
 FitLR Problem

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
WalterC Posted - 09/21/2010 : 04:33:00 AM
Hi,

I alway get an #Command error when trying to use the FITLR command within Labtalk.

The code in question is attached to this post. It should fit the colums line by line to the rot values given in the code. Everything except the "fitlr" command works fine. Even if I put "fitLR iy:=(10,11)" into the command window it gives the #command error.

Did i do anything wrong at this command? I do not understand why it does not work because I used the exact spelling given in the origin help.


rot = {3000,2500,1500,900,400,200};
range rSheet = 1!; 
rSheet.AddCol(kotlev);
rSheet.AddCol(stdDev);
rSheet.AddCol(sqrtrot);
rSheet.col10.type = 4;
rSheet.AddCol(worstfit);
range aa = rSheet.Col(2), bb = rSheet.Col(3), cc = rSheet.Col(4), dd = rSheet.Col(5), ee = rSheet.Col(6), ff = rSheet.Col(7);

range kotlev = rSheet.Col(kotlev), stdDev = rSheet.Col(stdDev), sqrtrot = rSheet.Col(sqrtrot), worstfit = rSheet.Col(worstfit);

loop(ii, 1, aa.GetSize()){
	sqrtrot =  sqrt(rot);
	loop(jj, 2, 7){
		temp = wcol(jj);
		worstfit[jj-1] = temp[ii];
	}
	range fit = (10,11);
	fitlr i := fit a := kotlev[ii];
	//kotlev[ii] = fitlr.a;
	//cell(4,ii) = fit[1];
}
2   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 09/21/2010 : 05:56:50 AM
Hi,

The firlr X-Function is available since Origin 8 SR1, you are using Origin 8 SR0, so it did not work in your version. Please update to Origin 8 SR6 by following the instruction in this page.

When using Origin 8 SR6, the column range need to be defined as following, need the %() substitution, but not the way with a point between range and column (like rSheet.Col(2)).

range %(rsheet) aa = Col(2), bb = Col(3), cc = Col(4), dd = Col(5), ee = Col(6), ff = Col(7);
// or this way
range kotlev = %(rsheet)Col(kotlev), stdDev = %(rsheet)Col(stdDev), sqrtrot = %(rsheet)Col(sqrtrot), worstfit = %(rsheet)Col(worstfit);


Penn
WalterC Posted - 09/21/2010 : 04:51:33 AM
since editing doesn´t work, I have to add a new reply with the details I forgot in the previous post:

Origin Version: OriginPro 8 SR0 v8.0724
Windows XP

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