Re: variogram
- To: mathgroup at smc.vnet.net
- Subject: [mg42055] Re: variogram
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Tue, 17 Jun 2003 05:43:57 -0400 (EDT)
- References: <bcjulj$hsd$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
t = {t1, t2, t3, t4, t5, t6, t7, t8};
Module[{tr = t},
Flatten[(tr = Rest@tr; (# - tr)^2/2) & /@ t]]
Bob Hanlon
In article <bcjulj$hsd$1 at smc.vnet.net>, civnrn at hotmail.com (Rees) wrote:
<< Subject: variogram
From: civnrn at hotmail.com (Rees)
To: mathgroup at smc.vnet.net
Date: Mon, 16 Jun 2003 08:21:07 +0000 (UTC)
Hi,
Given the following dataset:
x y T
2.9 0.876 0.138
2.5 0.188 0.214
4.7 2.716 2.119
4.2 2.717 2.685
4.2 3.739 0.031
2.1 1.534 1.534
2.4 2.078 0.267
5.8 3.324 1.670
I want to formulate the variogram: ie the square difference
1/2[T(x,y)-T(x,y)']**2 for all measurement pairs. For the above 8
measurements there are (n(n-1))/2 = 28 such pairs.
so for T=0.138, the first step is to compute:
0.138-0.214 then 0.138-2.119 then 0.138-2.685....then 0.138-1.670
the next step is:
0.214-2.119 then 0.214-2.685 etc [BUT NOT 0.214-0.138]
Is it possible to program this in mathematica? >><BR><BR>