equivalents for find function in matlab?

From: <wenlong_at_nyahnyahspammersnyahnyah>
Date: Tue, 13 Feb 2007 14:10:16 -0500

Hi all,

    I'm starting to learn NCL.

    Once thing I'd like to do is to set part of an array to a value I
want. In matlab is is really eazy:

    Say A(1:100,1:200) is a 2D float array,

    I can do the following to set all locations with value >10 to 100.0

%----matlab----
     Ifind=find(A>10.0); %find the indices that statisfy the condition
     A(Ifind) =100.0; %reset the value to 100.0
%--------------

     Is there a fast way to do this in NCL? I mean, I really don't
want to use tedious do loops.

   Thanks

   Wen

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 13 2007 - 12:10:16 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 13 2007 - 14:07:37 MST