how to change the logical type matrix into other type

2 Ansichten (letzte 30 Tage)
SHUNSUKE YAMANAKA
SHUNSUKE YAMANAKA am 19 Okt. 2017
Kommentiert: Stephen23 am 19 Okt. 2017
Dear Sir or Madam,
I would like to change the logical type matrix into other type ( double , boolean...). But , I can't change it. Otherwise , I tried by using typecast command.
I'm pleased if you let me know.
Sincerely,

Akzeptierte Antwort

Stephen23
Stephen23 am 19 Okt. 2017
Bearbeitet: Stephen23 am 19 Okt. 2017
double(M)
where M is your logical matrix. For example:
>> M = [true,false,true]
M =
1 0 1
>> double(M)
ans =
1 0 1

Weitere Antworten (0)

Kategorien

Mehr zu 数値型 finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!