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
 if statement with parameters in condition
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kamu

Netherlands
Posts

Posted - 09/14/2007 :  05:42:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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
  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