Re: Placing constraints on Interpol [message #55724 is a reply to message #55720] |
Tue, 04 September 2007 05:17  |
Conor
Messages: 138 Registered: February 2007
|
Senior Member |
|
|
On Sep 3, 3:23 pm, Vidhya <vidh...@gmail.com> wrote:
> Dear All,
>
> Is it possible in IDL to place constraints while interpolation such
> that the elements should not be zero and all the elements add up to 1?
>
> Any ideas?
>
> Vidhya
It would seem to me that this would depend on the details of your data
set. For starters, if you don't want anything to interpolate to zero
then you should split up the interpolation into two steps - once for
the positive, once for the negative. As for making everything add up
to one, I don't see the way to do that, conceptually. After all, for
everything to add up to one will depend on a) the 'magnitude' of the
values you are interpolating between and b) the number of elements you
are interpolating. If you have a large number of elements and you
want to add them up to one, then the values you are interpolating
between MUST be much smaller than one. Either that, or after the
interpolation is done just weigh the elements so they add up to one.
i.e. elements /= total(elements)
|
|
|