>
> On Fri, Sep 3, 2010 at 12:19 AM, Gael Guennebaud <
gael.guennebaud@xxxxxxxxx>
> wrote:
>>
>> you can do:
>>
>> A = (A.array()<0.0001).select(0,A);
>>
>> where the "select" method mimics the c++ ?: operator.
>>
>> gael
>>
>>
>> On Fri, Sep 3, 2010 at 6:40 AM, Suresh Kumar
>> <
suresh.amritapuri@xxxxxxxxx> wrote:
>> > Hi
>> > I want to replace all elements of a matrix, which are less than a
>> > threshold
>> > by zero. How to do it without writing a nested for loop?
>> > I am looking for something like this in matlab. A(A < 0.001) = 0 where A
>> > is
>> > a matrix.
>> > Thanks
>> > suresh