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
 Help with Origin curve
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tuantran

Vietnam
2 Posts

Posted - 10/09/2017 :  11:56:56 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to fit a simple function but it get the following error.

#pragma warning(error : 15618)
#include <origin.h>

// Add your special include files here.
// For example, if you want to fit with functions from the NAG library,
// add the header file for the NAG functions here.

// Add code here for other Origin C functions that you want to define in this file,
// and access in your fitting function.

// You can access C functions defined in other files, if those files are loaded and compiled
// in your workspace, and the functions have been prototyped in a header file that you have
// included above.

// You can access NLSF object methods and properties directly in your function code.

// You should follow C-language syntax in defining your function.
// For instance, if your parameter name is P1, you cannot use p1 in your function code.
// When using fractions, remember that integer division such as 1/2 is equal to 0, and not 0.5
// Use 0.5 or 1/2.0 to get the correct value.

// For more information and examples, please refer to the "User-Defined Fitting Function"
// section of the Origin Help file.


//----------------------------------------------------------
//
void _nlsftuan(
// Fit Parameter(s):
double a, double b, double c,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
// Beginning of editable part
y = a+b+sqrt(x+c*(x^2))
// End of editable part
}

please help me

tuantran

nick_n

Finland
125 Posts

Posted - 10/09/2017 :  4:25:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
I'm little bit confusing. Is your code looks exactly like that:

void _nlsftuan(
// Fit Parameter(s):
double a, double b, double c,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
// Beginning of editable part
y = a+b+sqrt(x+c*(x^2))
// End of editable part
}
BR,

Nikolay
Go to Top of Page

tuantran

Vietnam
2 Posts

Posted - 10/09/2017 :  8:46:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
hi, nick_n,
yes, exactly, that is my code.

tuantran
Go to Top of Page

nick_n

Finland
125 Posts

Posted - 10/10/2017 :  6:14:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
I cannot reproduce your problem.

Please, contact OriginLab support tech@originlab.com BR,

Nikolay
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