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

Home » Public Forums » archive » interpolate 3D matrix
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 3D matrix [message #90410] Mon, 02 March 2015 06:04 Go to previous message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Hi

I have two 3D arrays Ax and Ay with the following dimensions[100,4,4]=[time,x,y].

I wanted to interpolate my matrices Ax and Ay and make them to have dimensions of [100,8,8]. A part of my code is shown below:

size = 8
Ax_2D_INT = fltarr(100,size,size)
Ay_2D_INT = fltarr(100,size,size)

for i=0, 99 do begin
Ax_2D = REFORM(Ax[i,*,*]) ;change 3D to 2D
Ay_2D = REFORM(Ay[i,*,*])

dimensions_I_need = size(Dindgen(size,size),/Dimensions)
dimensions_I_have = size(Ax_2D,/Dimensions)

X = cgScaleVector(Dindgen(dimensions_I_need[0]), 0, dimensions_I_have[0]-1)

Y = cgScaleVector(Dindgen(dimensions_I_need[1]), 0, dimensions_I_have[1]-1)

Ax_2D_INT = INTERPOLATE(Ax_2D,X, Y, /GRID)
Ay_2D_INT = INTERPOLATE(Ay_2D,X, Y, /GRID)
endfor

I got the following error but I couldn't figure out why.
Attempt to subscript DIMENSIONS_I_HAVE with <INT ( 1)> is out of range.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Is it possible to save the figure file in .PNG format directly in IDL?
Next Topic: function graphics event handling

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

Current Time: Wed Oct 08 11:33:53 PDT 2025

Total time taken to generate the page: 0.00380 seconds