Convert logical vector to double

467 次查看(过去 30 天)
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!

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile 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