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
 Origin Forum
 Problem with User-Defined Function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Noba

2 Posts

Posted - 05/04/2000 :  8:48:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm writing a function to fit a curve.

Here is what I wrote:
temp1=A/w*sqrt(4*ln(2)/PI);
if (x{temp2=exp(-4*ln(2)*(x-xc)^2)*(abs(t-(x-xc))^p1);
y=temp1*integrate(temp2)}
else
{temp2=exp(-4*ln(2)*(x-xc)^2)*(abs(t-(x-xc))^p2);
y=temp1*integrate(temp2)}

Origin kept on giving me an error message saying that there are too many bad functional evaluations and that parameters may be out of range. Anyone have any idea what is wrong?

greg

USA
1379 Posts

Posted - 05/08/2000 :  3:16:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Your equation does not have a valid condition for the if clause:
if (x{temp2=exp(-4*ln(2)*(x-xc)^2)*(abs(t-(x-xc))^p1);

It's not clear what your intent was for this conditional.
Go to Top of Page

Jean Michel Giraud

DRUMMONDVILLE (Que)
2 Posts

Posted - 05/08/2000 :  8:48:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I may help, but show me your equation as in text book.
A brief description will be great unless
it is private research.
Preferabbly reply to my e.mail because I hate
crumbling in the forum.
jmgiraud@infoteck.dr.qc.ca
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