c++ - Eigen elements manipulation without loop -


i want check if elements of matrix smaller 0 want assign 0 them, in matlab done using this:

ind = find(floatframe < 0); floatframe(ind) = 0; 

is there equivalent eigen matrices?

you can use select function, similar ternary ?: operator in c. example:

floatframe = (floatframe < 0).select(0, floatframe) 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -