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!

 采纳的回答

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

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by