Convert logical vector to double

Hi all,
I'm looking for a way to take a logical vector and convert it to a double in the workspace. How can I do this? I can't seem to find a command to help.
Thanks in advance!

 Accepted Answer

Just simply use double command?
a=[true false];%boolean array
double(a)

More Answers (0)

Categories

Asked:

on 15 Mar 2018

Edited:

on 7 May 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!