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
 exp and abs not found???

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
federator3000 Posted - 02/15/2012 : 06:54:13 AM
Hi,
I'm using the fitting function organizer (of origin 8.1)and i have a problem when i try to compile in the origin code builder.

This is my code:

#pragma warning(error : 15618)
#include <origin.h>
// 
void _nlsfcfitqhi(
// Fit Parameter(s):
double V0, double popF2q1, double popF2q2, double popF1q1, double popF1q2,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
	// Beginning of editable part
	
	y=(V0*(popF2q2*(exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/6,7)^2))*cos(-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2+3*(-0,00662*x^2)/4+(-0,00018*x^3))+exp(-(((-0,00662*x^2)/6,7)^2))*cos(-0,00662*x^2)+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2+3*(-0,00662*x^2)/4-(-0,00018*x^3))+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/6,7)^2))*cos(1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31)))+popF1q2*(exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2-3*(-0,00662*x^2)/4-(-0,00018*x^3))+exp(-(((-0,00662*x^2)/6,7)^2))*cos(-0,00662*x^2)+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2-3*(-0,00662*x^2)/4+(-0,00018*x^3)))))
	 /(V0*(popF2q1*(exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/6,7)^2))*cos(-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2+3*(-0,00662*x^2)/4+(-0,00018*x^3))+exp(-(((-0,00662*x^2)/6,7)^2))*cos(-0,00662*x^2)+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2+3*(-0,00662*x^2)/4-(-0,00018*x^3))+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/6,7)^2))*cos(1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31)))+popF1q1*(exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2-3*(-0,00662*x^2)/4-(-0,00018*x^3))+exp(-(((-0,00662*x^2)/6,7)^2))*cos(-0,00662*x^2)+exp(-(((1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/(2*6,7))^2))*cos((-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))/2-3*(-0,00662*x^2)/4+(-0,00018*x^3)))))
		
	// End of editable part


Please, don't tell me my fitting function is too long

The error that appears is:
quote:

Linking...
Done!
compiling...
_nlfcfitqhi.fit
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(30) :Error, function or variable abs not found
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(40) :Error, function or variable not found
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(30) :Error, function or variable abs not found
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(40) :Error, function or variable not found
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(30) :Error, function or variable abs not found
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(40) :Error, function or variable exp not found
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(40) :Error, general compile error
C:\Users\jonathan\Documents\OriginLab\81\User Files\OriginC\NLSF\_nlfcfitqhi.fit(30) :Error, error(s) found in compiling function _nlsfcfitqhi
Compile Failed!


i was a little bit surprised when i saw that "exp" and "abs" are considered as unknwon functions because i used these into another fitting function without problem.

I need help, pleeeeeeeeeeeeeease

Bye.
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 02/15/2012 : 10:45:44 AM
While Origin is generally pretty good at handling number systems that use ',' as the decimal point, certain ambiguities can arise in C (and Origin C) when parsing such numbers - particularly when they occur within functions where the parser is looking for ',' as argument separators.

The messages about not finding functions abs and exp are somewhat erroneous in that what Origin really could not find was a prototype for those functions that have multiple arguments - due to the use of ','.

You need to modify your function by putting protective parentheses around all such ambiguous numbers.

Here is one snippet from your function and how it had to be fixed:

cos(-1,43*abs(0,35*x-0,022)-0,43*abs(x-0,31))
needs to be changed to:
cos((-1,43)*abs((0,35)*x-(0,022))-(0,43)*abs(x-(0,31)))


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