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
 Origin Forum
 temporary variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jupp

Germany
6 Posts

Posted - 11/14/2002 :  10:10:05 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I'm trying to use a rather long and complicated equation with the Origin NLSF fitter. According with a tutorial I down-loaded from the Origin homepage (Chapter 16 on curve-fitting, page 36), it should be possible to break down the equation into smaller pieces by using temporary variables. Just to give you an example of what I mean:

A = k * x + c;
B = sin (x^2) + p/x;
y = A / B;

In this case, A and B would be temporary variables which I should
not need to define in the paramaetrs line in the NLSF fitter equation form (k, c, and p are the parameters). However, the compiler always complains that A and B are not defined, no matter what I try. It only works when I include the temporary variables in the parameter line.

Can anyone help me out?

Thnx,

Stefan

cpyang

USA
1406 Posts

Posted - 11/14/2002 :  10:28:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Origin's NLSF fitter used to be LabTalk based. In LabTalk, variables are created on first use. After Origin 7, NLSF can be used with Origin C compiler, and for C, all variables must be declared, so you will need to do
 
double A,B;
A = k*x + c;
B = sin(x^2) + p/x;
y = A/B;



if you want to compile the equations in Origin C.

CP




Edited by - cpyang on 11/14/2002 10:28:56 AM
Go to Top of Page

Mike

USA
357 Posts

Posted - 11/14/2002 :  3:41:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Stefan, I have updated the Chapter 16 - Curve Fitting PDF that you refer to.

My apologies and thank you for pointing out that this document contained out of date information.

Mike Genthner
OriginLab
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