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
 Forum for Origin C
 error fit function 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

lojius

Malaysia
2 Posts

Posted - 04/19/2011 :  04:29:25 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): originPro 8.1 SR3
Operating System: windows 7

Hi, i'm new to origin, i tried to fit an error function. Below is my code.
These error code came out when i tried to compile the code.
1.Error, function or variable nag_erf not found
2.:Error, general compile error

3.:Error, error(s) found in compiling function _nlsferfgen

#pragma warning(error : 15618)
#include <stdio.h>
#include <data.h>
#include <math.h>
#include <utilities.h>
#include <origin.h>


//----------------------------------------------------------
//
void _nlsferfgen(
// Fit Parameter(s):
double P1, double P2, double P3, double P4,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
// Beginning of editable part
y=P1+P2*nag_erf((x-P3)/(sqrt(2)*P4))
// End of editable part
}

Penn

China
644 Posts

Posted - 04/19/2011 :  9:25:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You are using a NAG function (nag_erf) in the definition of fitting function, so, you need to include the header file for the NAG functions. Please refer to this page for more details.

Penn
Go to Top of Page

lojius

Malaysia
2 Posts

Posted - 04/20/2011 :  03:08:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Penn.
It solved my problem.
Go to Top of Page

jimkoli

India
1 Posts

Posted - 05/10/2011 :  01:03:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thanks dude
i known error in my code



i need seo

Edited by - jimkoli on 04/22/2012 06:55:10 AM
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