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
 new function for fitting erf
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jonatansilva

Brazil
2 Posts

Posted - 12/17/2010 :  08:22: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):Origin8 SR2
Operating System: Windows XP
Originally posted by giovanetti

I have the same problem to make a new function for fitting, this is the source code in C
#include <origin.h>
#include <stdio.h>
#include <data.h>
#include <math.h>
#include <utilities.h>
#include <OC_NAG.h>

void _nlsfNewFunction(
// Fit Parameter(s):
,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
// Beginning of editable part
void _nlsfbeac(
// Fit Parameter(s):
double G1, double B1, double R1, double P1, double G2, double B2, double R2, double P2,
double Rg, double Bg, double k1, double b,
// Independent Variable(s):
double q,
// Dependent Variable(s):
double& I)
{
// Beginning of editable part
I = G1*exp(-(1/5) * (R1*q)^2) + B1 * exp(-(1/5) * (Rg*q)^2) * (nag_erf(q*R1/6^(1/2))^3/q)^P1 + (G2 * exp(-(1/5) * (R2*q)^2) + B2 * (nag_erf(q*R2/6^(1/2))^3/q)^P2)*(1 - 8*k1*3*(sin(2*q*b)-2*q*b*cos(2*q*b))/(2*q*b)^3) + Bg;
// End of editable part
}
// End of editable part
}
and return

Linking...
Done!
compiling...
_nlfNewFunction.fit
C:\Program Files\OriginLab\Origin8\OriginC\system\OC_NAG.h(20) :Error, include file not found
C:\Documents and Settings\jonatan\My Documents\OriginLab\Origin8\User Files\OriginC\NLSF\_nlfNewFunction.fit(6) :Error, include file compilation error
Compile Failed!
How can I fix this?

Jonatan Silva fone: +55 11 3091-6814
Instituto de Física FAP - USP
Rua do Matão
Travessa R, no 187
Basilio Jafet, sala 124B
CEP: 05508-000, Cidade Universitária-São Paulo-Brasil.

larry_lan

China
Posts

Posted - 12/17/2010 :  10:13:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Include file wrong?

#include <OC_NAG8.h>

Thanks
Larry
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