Parshuram M. Kamble
2017-08-26 09:25:09 UTC
Hi all,
How does one convert a logical array back to an array of doubles without
a_logical = logical( [ 1 2 3 ] );
a_double = a_logical + 0;
Is seems to me that this is inefficient. Why should you need to add a value
(even if it is zero) to every element in a vector just to change from
a_double = double( a_logical )
would work, but it doesn't.
Jordan
How does one convert a logical array back to an array of doubles without
a_logical = logical( [ 1 2 3 ] );
a_double = a_logical + 0;
Is seems to me that this is inefficient. Why should you need to add a value
(even if it is zero) to every element in a vector just to change from
a_double = double( a_logical )
would work, but it doesn't.
Jordan