Clear Filters
Clear Filters

Convert logical vector to double

488 views (last 30 days)
Dylan Mecca
Dylan Mecca on 15 Mar 2018
Edited: AIJAZ BHAT on 7 May 2021
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

Birdman
Birdman on 15 Mar 2018
Just simply use double command?
a=[true false];%boolean array
double(a)

More Answers (0)

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!