T O P I C R E V I E W |
cellbiophysics |
Posted - 01/11/2008 : 03:40:47 AM Origin Version (Select Help-->About Origin): 7.5 SR4 Operating System: Window XP
Dear all, I have a problem in fitting with imaginary part. My fitting equation is as follows;
y=i*sqrt(a*x)*(erf(i*sqrt(b*x))-erf(i*sqrt(c*x))),
where a, b, and c are fitting parameters. When I compiled this, some errors happened. I am almost new in Origin C. I don't know how to solve them and how to define or set the function with imaginary part. Please let me know.
Thanks,
Kang-Bin. |
3 L A T E S T R E P L I E S (Newest First) |
larry_lan |
Posted - 01/14/2008 : 10:05:51 PM Hi Kang-Bin:
The error function we provide is double, so first of all, you should define a new error function pass and return complex number.

Since in your function, the integrate limit is complex, you'd better transform this formula. I am not good at math, maybe the new equation form is:

Then you can calculate the integrate value while trapezia algorithm.
After these done, you should also guarantee that the right part of your fitting function is Real, because the dependent variable, y, is double. Maybe you can calculate the modulus of the expression before assigning to y?
I admit it's difficult, good luck!
Thanks Larry OriginLab Technical Services
Edited by - larry_lan on 01/15/2008 09:02:47 AM |
cellbiophysics |
Posted - 01/14/2008 : 04:12:09 AM Dear Deanna,
Thanks, Deanna. Yes, X and Y are real numbers, because erf gives also imaginary numbers in my fitting function. This means the fitted data are real numbers. But, I looked for "erf" in Help. "erf" function is "double". I'm afraid "erf" cannot give imaginary numbers. Do you have any good idea?
Thanks,
Kang-Bin.
Edited by - cellbiophysics on 01/14/2008 04:14:12 AM |
Deanna |
Posted - 01/14/2008 : 04:03:55 AM Hello Kang-Bin,
Currently in Origin, we only support curve fitting with both X and Y as real numbers. Therefore, we need to know whether the X and Y (the independent variable and dependent variable) which you are trying to fit are real numbers.
If both X and Y are real numbers, it is possible to fit them with the equation you have posted here. We can tell you more details on how to do it.
If either X or Y has numbers with non-zero imaginary parts, the curve fitting cannot be done with our current product. However, we will consider adding this feature to our future version. If you have a good example of fitting complex numbers, it will be very helpful for us to develop this new feature. If you don't mind, you can send us the data which you are trying to fit with the formula posted here. We would greatly appreciate it! You can email the data to tech@originlab.com . Thank you in advance!
Deanna OriginLab Technical Services |
|
|