MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Summation of imported data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118905] Re: Summation of imported data
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sun, 15 May 2011 07:04:38 -0400 (EDT)

Clear[starDiff, a, b]
starDiff[t_, De_, dprime_] := 1 - 2 dprime Sqrt[t De/Pi]
n = 5;
time1 = Array[t, n];
con1 = Array[c, n];
#.# &[con1 - starDiff[time1, De, dprime]]

(-1 + c[1] + (2 dprime Sqrt[De t[1]])/Sqrt[\[Pi]])^2 + (-1 + c[2] + (
    2 dprime Sqrt[De t[2]])/Sqrt[\[Pi]])^2 + (-1 + c[3] + (
    2 dprime Sqrt[De t[3]])/Sqrt[\[Pi]])^2 + (-1 + c[4] + (
    2 dprime Sqrt[De t[4]])/Sqrt[\[Pi]])^2 + (-1 + c[5] + (
    2 dprime Sqrt[De t[5]])/Sqrt[\[Pi]])^2

Bobby

On Sat, 14 May 2011 02:10:23 -0500, Thomas <imadorkous at gmail.com> wrote:

> I know what I want to do but I dont know how to implement it onto  
> Mathematica.
>
> What I am trying to do is create an objective function that I can get a  
> good fit to my data points.
>
> The function I want to minimize is:
>  Cstardiff[t_, De_, dprime_] := 1 - 2 dprime Sqrt[t De/Pi]
>
> I have two imported data sets, time1 and con1 that are in lists
>
> So I want to do a summation from i=1 to 63, (because there is 63 terms  
> for each imported data set), and my summation function would be:
> (con1(i) - Cstardiff[time1(i), De_, 1])^2
>
> If anyone can help me with this that would greatly appreciated!
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: How do you read Mathematica?
  • Next by Date: Re: Maintaining the order of terms when adding symbolic expressions
  • Previous by thread: Re: Summation of imported data
  • Next by thread: Re: Summation of imported data