| 
November 30th, 2008, 01:23 PM
| | Newbie | | Join Date: Nov 2008
Posts: 5
Country: Thanks: 2
Thanked 0 Times in 0 Posts
| | Regression of series equation Hello to everbody,
I wave an equation with datas and want to regress in non linear form with plot.
Would you help me to solve the equation bellow by any softwares, please?
The data, the equation and parameters are given bellow. I want to fit the data to non-linear equation to find D and k values.
I just need help.
Your sincerely,,
Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2]
[Sum] goas from 1 to 1000
Ms=140
Mo=11.58
R=0.004
Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85
Last edited by ayildirim; December 1st, 2008 at 01:44 AM.
| 
November 30th, 2008, 04:18 PM
|  | Grand Panjandrum | | Join Date: Nov 2005 Location: South of England
Posts: 11,265
Country: Thanks: 656
Thanked 3,585 Times in 2,887 Posts
| | Quote:
Originally Posted by ayildirim Hello to everbody,
I wave an equation with datas and want to regress in non linear form with plot.
Would you help me to solve the equation bellow by any softwares, please?
The data, the equation and parameters are given bellow. I want to fit the data to non-linear equation to find a and k values.
I just need help.
Your sincerely,,
Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2* Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2] [Sum] goas from 1 to 1000
Ms=140
Mo=11.58
R=0.004
Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85 | Try using the solver shipped with Excel.
CB
__________________ Truth does not change because it is, or is not, believed by a majority of the people.
Giordano Bruno | | The following users thank CaptainBlack for this useful post: | |  | 
November 30th, 2008, 04:23 PM
| | Super Member | | Join Date: Aug 2008
Posts: 566
Country: Thanks: 44
Thanked 246 Times in 213 Posts
| | Quote:
Originally Posted by ayildirim
Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2] [Sum] goas from 1 to 1000
Ms=140
Mo=11.58
R=0.004
Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85 | You got undefined D and I don't see any a in there.
__________________ "I am beset by the ironies in my life" | | The following users thank shawsend for this useful post: | |  | 
December 1st, 2008, 01:35 AM
| | Newbie | | Join Date: Nov 2008
Posts: 5
Country: Thanks: 2
Thanked 0 Times in 0 Posts
| | Here D and k are constans to be evaluated.
Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2] [Sum] goas from 1 to 1000
Ms=140
Mo=11.58
R=0.004
Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85 | 
December 1st, 2008, 05:02 AM
| | Super Member | | Join Date: Aug 2008
Posts: 566
Country: Thanks: 44
Thanked 246 Times in 213 Posts
| | Hey is this it:
with D and k to be determined by the fit?
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; December 1st, 2008 at 05:15 AM.
| 
December 1st, 2008, 08:50 AM
| | Newbie | | Join Date: Nov 2008
Posts: 5
Country: Thanks: 2
Thanked 0 Times in 0 Posts
| | regression My question on attacment. | 
December 1st, 2008, 01:40 PM
| | Super Member | | Join Date: Aug 2008
Posts: 566
Country: Thanks: 44
Thanked 246 Times in 213 Posts
| | Quote:
Originally Posted by ayildirim My question on attacment. | Ayildirim, that's harder to read than my equation above and also it looks to have another variable M_s or something other. Is the equation I posted the correct one and if not, what corrections have to be made.
__________________ "I am beset by the ironies in my life" | 
December 2nd, 2008, 01:20 AM
| | Newbie | | Join Date: Nov 2008
Posts: 5
Country: Thanks: 2
Thanked 0 Times in 0 Posts
| | In the equation that you send me, the division is only related to exp term. This is wrong. The division have to be for over all terms in Sum function.
Also the limits of sum function must be from 1 to 1000. | 
December 2nd, 2008, 07:31 AM
| | Super Member | | Join Date: Aug 2008
Posts: 566
Country: Thanks: 44
Thanked 246 Times in 213 Posts
| | Ok, this is what I did then:
Using:
(changed D to d since D means derivative in Mathematica)
I wrote the following Mathematica code to try and fit the data to your expression. Unfortunately, Mathematica returns a negative value for d which quickly causes overflow with the sum (even with smaller upper limits on the sum overflow occurs): Code: vals={{0,11.58},{30,72.61},{60,97.89},
{90,106.05},{120,109.63},{150,117.02},
{180,119.57},{210,125.99},{240,129.56},
{270,132.85}};
lp = ListPlot[vals, PlotRange -> {{0, 200}, {0, 300}}]
coef = FindFit[vals, M[t], {d, k}, t]
p1 = Plot[f[t] /. coef, {t, 0, 3}]
Mathematica returns:
{d -> -1.84547*10^8, k -> 122.325}
Oh yeah, if the equation is still not correct, click on it. A small window will appear with the LaTex code I wrote to generate the math code. You can understand it. \frac means fraction in french brackets, power is ^, so forth. with the [math] brackets starting and ending it. Try and cut and paste it into a new post and edit the code as you wish even if it comes out messy. It's a start and you should try posting in Latex so everything is neat, well defined and explicit so people will follow it easily.
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; December 2nd, 2008 at 07:50 AM.
| 
December 2nd, 2008, 08:04 AM
| | Newbie | | Join Date: Nov 2008
Posts: 5
Country: Thanks: 2
Thanked 0 Times in 0 Posts
| | regression of series equation After Mo in the general equation (+) sign can be changed to (-) sign.
like this
M(t)=Mo+C1*......................... | 
December 2nd, 2008, 09:25 AM
| | Super Member | | Join Date: Aug 2008
Posts: 566
Country: Thanks: 44
Thanked 246 Times in 213 Posts
| | Quote:
Originally Posted by ayildirim After Mo in the general equation (+) sign can be changed to (-) sign.
like this
M(t)=Mo+C1*......................... | Hey ayildirim. That doesn't help. Still getting either underflow or overflow depending on how many terms I use for the sum.
__________________ "I am beset by the ironies in my life" | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -7. The time now is 08:16 PM. | | |