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

Home » Public Forums » archive » changing matrix size using interpolation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
changing matrix size using interpolation [message #74424] Mon, 17 January 2011 06:31
oxfordenergyservices is currently offline  oxfordenergyservices
Messages: 56
Registered: January 2009
Member
I think this might not be too hard but it would be great to have a
pointer to the routines...

I have a x by y matrix (of elevations for a topographic map)

I want to turn it into a new matrix which is n by m where n and m
could be greater or less than x or y and not necessarily an integer
multiple or fraction.

I have tried this...

x=4.0
y=4.0

a=findgen(x,y)

m=7.0
n=7.0

b=interpolate(a,findgen(m)*(x-1)/(m-1),findgen(n)*(y-1)/(n-1 ),/
GRID,missing=-1)

print,a
print,b

and it seems to work, but this must have been done many times before
and just wanted to check I'm right?

Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Secondary axis in NG
Next Topic: Re: Secondary axis in NG

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

Current Time: Wed Oct 08 18:41:00 PDT 2025

Total time taken to generate the page: 0.00621 seconds