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
Post a Comment