r/find/filter/ On Fri, Dec 5, 2014 at 5:32 PM, <[email protected]> wrote:
> Hi, > > Quick question. > > Say I have an array > > testarray = [0.1,0.2,0.3] > > > Now, using an array comprehension, how could I create an array featuring > all members of testarray > 0.1? > > I tried > > testarray2 = [testarray[i] > 0.1 for i=1:length(testarray)] > > and > > testarray2 = find(x -> x > 0.1,testarray) > > but neither of those worked to create > > testarray2 = [0.2,0.3] > > > Thanks. >
