Re: Offtopic - sampling problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mike,

Go to archives, get the simultaneous equations solver by Laurence Draper,
"simul.e"; change the main function "Solve_Simultaneous" to a global
function; then run this modification of his example that has just your
perceived data in it, and it will give you the original actual data:


-- tested code follows:
include simul.e

sequence A --Matrix of coefficients
sequence b --Column vector of results
sequence x --Column vector of solutions
A = {{.5,.25,0,0,0,0,0,0,0},
     {.25,.5,.25,0,0,0,0,0,0},
     {0,.25,.5,.25,0,0,0,0,0},
     {0,0,.25,.5,.25,0,0,0,0},
     {0,0,0,.25,.5,.25,0,0,0},
     {0,0,0,0,.25,.5,.25,0,0},
     {0,0,0,0,0,.25,.5,.25,0},
     {0,0,0,0,0,0,.25,.5,.25},
     {0,0,0,0,0,0,0,.25,.5}}
b = {1.5, 2.75, 3.5, 4.75, 5.75, 5.5, 5.5, 6.25, 4.25}
if length(A[1]) = length(b) then
   dimension = length(A[1])
   x = Solve_Simultaneous(A,b)
   ? x
else
   puts(1, "Matrices are incorrect size!!!!")
end if

-- code ends

This will handle your *simplified* example.

Dan Moyer

----- Original Message -----
From: "Mike" <vulcan at win.co.nz>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, January 26, 2002 1:09 PM
Subject: Offtopic - sampling problem


>
> Hi All,
>
> I am trying to solve a sampling problem and I have simplified it as
> below.
> Imagine this set contains precisely accurate real-world data that we
> wish to record into
> the computer (could be temperature or anything)
>
> 1,   4,    2,    6,    5,    7,   3,   9,   4
>
> Now, suppose we tried to capture each iteration with a sampling system
> that was not
> focussed narrowly enough and so each sampled value acquired contained
> some overlap
> from each adjacent value, assuming a spread of 25%, 50%, 25% we would
> get:
>
> 1.5, 2.75, 3.5, 4.75, 5.75, 5.5, 5.5, 6.25, 4.25
>
> Each captured value tends to get "smeared" toward the average value
>
> My Question is this: Does anyone know of or could point to a way to
> focus
> the 2nd sample set back to the original set?
>
> Any help on this is really appreciated.
>
> Yours truly
> Mike
> vulcan at win.co.nz
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu