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
 Sum in 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

Leviasa

Germany
2 Posts

Posted - 03/29/2017 :  08:04:17 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Operating System: OriginPro 2016 (64bit)

Hi,
I'm triying to build a fit function with Origin which includes a summation equation like:
F(x)=∑(i=1 to i=n) (G_i*x^2*(L_i)^2)/(1+x^2*(L_i)^2)

I can't build up this function as a fit function (because of the G_i and L_i). Any basic help in the right direction would be appreciated.

Thank you very much for helping me

Hideo Fujii

USA
1582 Posts

Posted - 03/29/2017 :  6:05:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Leviasa,

I have tried to define a simple function which contains a summation:

y = ∑{ii=1 to x}(A*ii)

with the following function (Function Type = Origin C) :
double tmp=0;
int ii;
for(ii=1; ii<x; ii++) {
  tmp=tmp+A*(x+ii);
}
y=tmp;

This worked as follows:


Does this help?

--Hideo Fujii
OriginLab
Go to Top of Page

Leviasa

Germany
2 Posts

Posted - 03/30/2017 :  10:34:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Not really, but thank you.
The problem is I want the value of "n" and every variable (G_1, G_2, ... and L_1, L_2, ...)

Here you can see my equation aqain:

Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/30/2017 :  1:54:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Leviasa,

I'm not aware of such method, but for me, it seems not a typical regression because:

1) The number of parameters varies depending on a parameter value.
2) You might be possible to choose "n" as large as you like since some parameter can asymptotically
approach toward 0. Then, the number of parameters may go infinitely.

If you have some reasonable constraint e.g., n<=3 , you can write the function as:
y=(G1*x^2*L1^2)/(1+x^2*L1^2)+(G2*x^2*L2^2)/(1+x^2*L2^2)+(G3*x^2*L3^2)/(1+x^2*L3^2);

But, it still appears for my eyes quite overparameterized (with 6 parameters already).

Maybe some specialist of numerical analysis around can suggest something?

Sorry for not to be helpful much.

--Hideo Fujii
OriginLab
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