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
 Additional extract from user defined fit 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

cheolmin park

2 Posts

Posted - 09/10/2020 :  09:33:51 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.originlab 2019 and Service Release (Select Help-->About Origin):
Operating System: window 10 pro
Hello. Dear friends.
I fitted by origin C in user defined fitting.
In the fit function, additionally, I want to extract real and imaginary value into worksheet coulomb;
Do you know how to do it?
((( Importantly, the fit data is numerically merged of real and imaginary. So the y value cannot separated.)))
----------------------------------------------------------------------
void _nlsMycomplexFitFunction(
// Fit Parameter(s):
double a1, double a2, double a3,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
double real;
double imaginary;
complex result=0;
:
:

real=result.m_re; //<---- this
imaginary=result.m_im; //<-----this

y=real+imaginary;
// End of editable part
}

Edited by - cheolmin park on 09/10/2020 10:12:44 AM

AmandaLu

439 Posts

Posted - 09/11/2020 :  02:43:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

To fit a complex function, you will need to put real and imaginary values into two columns, and the outputs are also in two columns. Please refer to this tutorial:

https://www.originlab.com/doc/Tutorials/Fitting-ComplexFunc

Thanks,
Amanda
OriginLab Technical Service
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