Re: Linear Interpolation Inversion for N even?



Greg Heath <heath@xxxxxxxxxxxxxxxx> wrote in message <8c13e682-
e924-4aea-8d41-d5d78bfd4d50@xxxxxxxxxxxxxxxxxxxxxxxxxxx>...
On May 6, 11:54 pm, "Roger Stafford"
<ellieandrogerxy...@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Greg Heath <he...@xxxxxxxxxxxxxxxx> wrote in message

<6ca9feef-9014-4491-
b1d2-60acf4d08...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...> This doesn't
work for any N.
Greg

-------
Greg, my understanding of your problem is that from xm(1),xm
(2),...,xm
(n-1), and some s, you want to recover the original x's, where

xm(1) = (x(1)+x(2))/2
xm(2) = (x(2)+x(3))/2
...
xm(n-1) = (x(n-1)+x(n))/2

I proposed s = x(1)-x(2)+x(3)-x(4)+x(5)....

but you don't know x you only know xm.


I admit you'll have to do a little work, but such an s would actually
suffice to
recover the original x's. This can be shown by the following example.
Let n
= 4. Define matrix A by

A = [.5 .5 0 0;
0 .5 .5 0;
0 0 .5 .5;
1 -1 1 -1];

b = [xm;s];

but s(x) is unknown.

where xm is a column vector. The equation

A*x = b;

corresponds to the original equalities above, and solving it for the x's by
way
of x = A\b would recover their original values uniquely. The general
formula
for the determinant of A when its size is n x n is (-.5)^(n-1)*n, so A can
never
be singular and these linear equations always have a unique solution.

Of course there is an infinitude of other ways of defining s that would
also
work, but I thought this one fit in with the spirit of your original sum,
even
though that one didn't actually work for even values of n. As you see,
the
above s works for all n, even or odd.

I see now that

2*sum(j=1,N-1){ xm(j)} = 2*sum(j=1,N){ x(j) } - ( x(1) + x(N) )
= - x(1) - x(N)% for mean(x) = 0

and

2*sum(j=1,N-1){(-1)^(j-1) * xm(j) } = x(1) + (-1)^(N-2) * x(N)
= x(1) - x(N)% for N odd
= x(1) + x(N)% for N even

Which leads to the simultaneous solution of x(1) and x(N) when
N is odd and an undetermined solution when N is even.

Hope this helps.

Greg
-----------------
Greg, I confess I'm feeling a bit exasperated at this point. Originally, you
asked the question, and I quote, "Is there a way to recover x if no original
points are known and N is even?" (in reference to only knowing the midpoint
values xm.) The answer is a flat NO for both N even or N odd. There is no
way the x's can be recovered without some additional information.

You also stated, "Under certain conditions the sampled function x(1:N) can
be reconstructed from the linearly intepolated midpoints." That circumstance
was that N be odd and the sum(x) be known, and this is true. It is not true if
N is even.

I proposed that instead of knowing sum(x), suppose you knew

s = sum((-1).^(0:N-1).*x)

which is just x(1)-x(2)+x(3)-x(4)+... In that case the x's can be recovered if s
is known, no matter whether N is even or odd.

Your response was to complain that you didn't know s because you didn't
know x. Why in the odd N case doesn't it also bother you that you don't know
sum(x) because you don't know x? What is there so special about sum(x), as
opposed to the sum of the x's with alternating sign reversals?

You will never be able to reconstruct the x values knowing only the xm
values. That is a fact. You must know some one other additional bit of
information about them. Answering a hypothesis about such additional
knowledge with the statement that "but you don't know x you only know xm"
is not going to bring you any closer to a resolution to your problem! You
must make up your mind whether or not you are going to permit anything
else to be known about these x's other than their midpoints, xm. If you
aren't, there is no solution to the problem. If you are, it isn't reasonable to
object to such additional knowledge simply because "but you don't know x."

In your last paragraph you appear to be tentatively trying out the hypothesis
of knowing the alternate-signs sum, but your attempt to do the
reconstruction is entirely incorrect. That is not the way it is done. It must be
done as I described in the earlier article, solving the equation A*x = b which I
defined there.

Roger Stafford


.



Relevant Pages

  • Re: Now that Doctor Who Is Over ...
    ... especially if you like Boosh and IT ... Crowd as they all share actors....very funny & odd show. ... Knowing Me Knowing You With Alan Partridge and I'm Alan ... Blood, Life On Mars, A Touch Of Frost, Midsomer Murders, Spooks, Ashes ...
    (rec.arts.drwho)
  • Re: Comic Relief & The NABD.
    ... Knowing you as I do, I don't find that odd at all :-) ... God, this pains me, but I have to agree with the old beardy - I don't ...
    (uk.rec.motorcycles)
  • Re: A Strory for those not too insecure to learn
    ... >How odd of God to choose the Jews: ... Chose God ... "Knowing what without knowing why is not knowing what" ...
    (rec.music.classical.recordings)
  • Re: refreshing image in ms word using vba
    ... Oh that's ok Greg, i appreciate your help thus far. ... Very odd tho..if you minimize word then restore...the picture has ... One would think a .screenrefresh function would do the same ...
    (microsoft.public.word.vba.general)
  • Re: [GIT PATCH] USB patches for 2.6.17
    ... Greg KH wrote: ... That's why I found it odd that I couldn't reproduce it ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)

Loading