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
 if statement with parameters in condition

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
kamu Posted - 09/14/2007 : 05:42:30 AM
Origin Version (Select Help-->About Origin): OriginPro 7.5 SR6
Operating System: Windows XP

I am trying to fit a function which is composed of several parts. The boundaries are depending on the fit parameters. I have tried it like this (with arbitrary data and parameter)

if ( 0.1 < abs(x^2-14+sqrt(gamma)) )
{
u1=0;
}
else
{
u1=500000;
}

if ( 0.1 < abs(x^2-14-sqrt(gamma)) )
{
u2=0;
}
else
{
u2=500000;
}

y=u1*x/(gamma^2+x^2)+u2*x/(gamma^2-x^2);

I have different function but they are way to long to put here. But I hope you get the idea. The function compiles, but then I get only zeroes when I calculate the Chi-Square and fitting doesn't work then, because the Chi-Square doesn't change.

Thanks for the help

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