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

Home » Public Forums » archive » subseting a 3D array based on values from a 2D array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
subseting a 3D array based on values from a 2D array [message #87484] Fri, 07 February 2014 05:25 Go to previous message
eva.ivits-wasser is currently offline  eva.ivits-wasser
Messages: 8
Registered: October 2011
Junior Member
Hi everyone,

I have a 2D array (A) with dimensions of [ns,nl] (where ns=number of columns and nl=number of lines) and a 3D array (B) with dimensions of [ns,nl,nb] (where nb=number of bands). A is a classification image whereas B is a time-series, both have the same number of samples and lines.
I'd need to find a certain value in A, let's say 100 (which occurs several times) and then I want to subset those elements of B which "overlaps" with A, i.e. have the same position as A.

I've tried the where function but that gives me the one dimensional subscript of A and I don't quite manage to index B based on this subscript...

I've tried array_indices but did not get further with that either.

Any suggestions please?

Thanks,
Eva
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: matchdelim
Next Topic: IDL_IDLBridge, spawn, and sftp, oh my!

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

Current Time: Wed Oct 08 14:11:24 PDT 2025

Total time taken to generate the page: 0.00181 seconds