Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
jbc1055
Posted - 03/28/2015 : 06:41:15 AM Origin Ver. 8.5.1 and Service Release (Select Help-->About Origin): Operating System: Windows 8.1
Hi,
I tried to build a equation in origin C for data fitting, but I am having trouble while performing quick check. I noticed that a variable is a complex number (f in the function body), so I used Re() in the final equation to fix that but it seems not working.
The data values of x vary from 0 toward negative values, and the corresponding y values should be positive. I tried using some random x values such as -0.01 for quick check, but the calculated y always shows y = --. I was wondering if anyone could teach me how to fix this issue.
Thanks in advance!
------ Independent variables: x Dependent variables: y Parameters: A
Function body:
double d; complex f;
d = exp(-75.287*x); f = 0.5*pi*(1/(1-d^2))^0.5 - atan(d/(1-d^2)^0.5)/(1-d^2)^0.5;
y = 3.1652e-10*A*Re(f);
1 L A T E S T R E P L I E S (Newest First)
Echo_Chu
Posted - 03/30/2015 : 04:19:58 AM Hi,
The atan() in your function can only works for real value.
I am afraid that Origin does not support arctan for complex values yet. You function can not be defined in Origin yet.