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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 new function for fitting erf

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jonatansilva Posted - 12/17/2010 : 08:22:25 AM
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.

1   L A T E S T    R E P L I E S    (Newest First)
larry_lan Posted - 12/17/2010 : 10:13:09 AM
Include file wrong?

#include <OC_NAG8.h>

Thanks
Larry

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000