Re: Help on comparing 2 arrays [message #70646 is a reply to message #70641] |
Mon, 26 April 2010 07:52  |
rogass
Messages: 200 Registered: April 2008
|
Senior Member |
|
|
On 26 Apr., 11:29, Dave Poreh <d.po...@gmail.com> wrote:
> Folks
> I am trying to compare on ground (on sea!) laser data with MERIS data
> for chlorophyll. Actually I have 2 arrays L[lat1, long1, c1] for on
> ground measurements (with 400 meters resolution) and C[lat2, long2,
> c2] for satellite data. What I want is this: for each pixel of C
> (satellite data) extract data from array L that dropped inside of this
> pixel. For instance for some pixels I have 3 or 4 data from L or
> whatever. Does anyone have some good idea how to do this?
> Any help highly appreciated.
> Cheers
> Dave
Hi Dave,
maybe you can do this in the following way (as far as I understood
what you want to do):
1. make a large array with a cell size of 10m covering the maximum
spatial dimensions of the largest array
2. make the array 3D
3. fill in 2D layer 1 your congrid(finite(L1),newsize), in layer2 your
congrid(finite(L2),newsize) and in layer3 your
congrid(finite(C),newsize), whereas in each layer the cells are
covered according the spatial dimensions of the input - so for one
MERIS cell 26x30 cells must contain a 1
4. ask for each 26x30 cell by where(total(array,3) gt 1) for the
related L1 or L2 measurements
5. rewrite the code to avoid for loops :)
I hope it helps somehow
Cheers
CR
|
|
|