[Haskell-cafe] Matlab Style Logic Operations ala V1.*(V2>0) on Vectors and Matrices with HMatrix ??

gutti philipp.guttenberg at gmx.net
Mon Dec 20 22:49:29 CET 2010


Hi all, 

In Matlab the following line of code:
V3 = V1.*(V2>0) 

(V2>0) gives a Bool-Vector with ones (trues) and zero's where elements 
of V2 are > 0; Then this Bool vector is used to multiply all elements in V1
to zero
where the condition V2>0 is not fulfilled. 

How can I do that in Haskell ?  (I haven't seen bol operations or mapping
functions into vectors, arrays
in the HMatrix.pdf).

. -- Many thanks in advance Phil



-- 
View this message in context: http://haskell.1045720.n5.nabble.com/Matlab-Style-Logic-Operations-ala-V1-V2-0-on-Vectors-and-Matrices-with-HMatrix-tp3312601p3312601.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list