comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » INTERPOLATE function - Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
INTERPOLATE function - Question [message #92833] Wed, 09 March 2016 04:34 Go to previous message
dmfl0590 is currently offline  dmfl0590
Messages: 17
Registered: December 2015
Junior Member
Hi all

I wrote the following code because I'm interested to understand how the INTERPOLATE (bilinear) function works.

Big = randomu(2,136,136)
nint = size(Big, /dimensions)

Small = fltarr(4,4)
Small[0,0]=0.1
n = size(Small, /dimensions)
n = n[1:*]

X = (n[0]-1)*findgen(nint[0])/(nint[0]-1E)
Y = (n[0]-1)*findgen(nint[0])/(nint[0]-1E)

Small_int = fltarr(nint[0],nint[1])
Small_int = INTERPOLATE(reform(Small[*,*]), X, Y, /GRID)

The Small array which is the array I want to interpolate has only one non-zero entry. When I interpolated from [4,4] to [136,136] I noticed that Small_int[0:44,0:44] its the non-zero part of the matrix (2025 non-zero pixels), i.e. that part of matrix affected by interpolation.

I did the same test but this time the Small=[8,8]. I interpolated to [136,136] and I got 400 non-zero pixels (i.e. Small_int[0:19,0:19]).

Does anyone knows if it's possible to know how many pixels will be affected when we interpolate our matrices?

Thanks in advance
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: power law fit with a constant
Next Topic: IDL on Mac Funning Yosemite?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:32:24 PDT 2025

Total time taken to generate the page: 0.00410 seconds