Re: ignorant interpol question [message #79131] |
Tue, 31 January 2012 19:47 |
Russell[1]
Messages: 101 Registered: August 2011
|
Senior Member |
|
|
On Jan 31, 6:14 pm, desertdryad <dry...@gmail.com> wrote:
> Hi folks ~
>
> I have a (large) series of 3 dimensional arrays,
>
> {x,y,t]
>
> that I need to interpolate. x and y are spatial variables, t is time
> (days of the year, in this case). I wish to interpolate each x,y
> variable individually, with respect only to t. I'd *like* to avoid
> FOR loops to do this, but I don't think I can do so with interpol - I
> would need to feed interpol one x,t and y,t vector at a time - or
> would I?
> Help!
>
> Thanks in advance.
>
> Cyndy
Yeah, this is pretty straight forward.
1. Define a new array of times, call it t2.
2. Use interpol for each dimension, x and y. call them x2 and y2:
x2 = interpol(x,t,t2)
y2 = interpol(y,t,t2)
-Russell
|
|
|