• Create Account

### #ActualTysonJ

Posted 02 November 2012 - 10:11 AM

I'm confused about bvecs. What can you do with them? Is their only use in the expressions if (any(bvec)) and if (all(bvec))?

I would like to efficiently generate a vector B from another vector A, where B.n is 1. if n is the largest component of A, and 0. otherwise.
so {0.1, 0.2, 0.8., 0.} -> {0., 0., 1., 0.}

I would like to do something like (greaterThan(A, A.yzwx) & greaterThan(A, A.zwxy) & greaterThan(A, A.wxyz)).ToFVec()... but of course it doesn't work that way...

### #1TysonJ

Posted 02 November 2012 - 10:10 AM

I'm confused about bvecs. What can you do with them? Is their only use in the expressions if (any(bvec)) and if (all(bvec))?

I would like to efficiently generate a vector B from another vector A, where B.n is 1. if n is the largest component of A, and 0. otherwise.
so {0.1, 0.2, 0.8., 0.} -> {0., 0., 1., 0.}

I would like to do something like (greaterThan(A, A.yzwx) && greaterThan(A, A.zwxy) && greaterThan(A, A.wxyz)).ToFVec()... but of course it doesn't work that way...

PARTNERS