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!

 採用された回答

Birdman
Birdman 2018 年 3 月 15 日

8 投票

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

2 件のコメント

Santiago Apellido
Santiago Apellido 2020 年 5 月 13 日
Thanks you!
AIJAZ BHAT
AIJAZ BHAT 2021 年 5 月 7 日
編集済み: AIJAZ BHAT 2021 年 5 月 7 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Type Conversion についてさらに検索

質問済み:

2018 年 3 月 15 日

編集済み:

2021 年 5 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by