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
 FitLR Problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

WalterC

2 Posts

Posted - 09/21/2010 :  04:33:00 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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];
}

WalterC

2 Posts

Posted - 09/21/2010 :  04:51:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Penn

China
644 Posts

Posted - 09/21/2010 :  05:56:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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