how to change the logical type matrix into other type

조회 수: 2 (최근 30일)
SHUNSUKE YAMANAKA
SHUNSUKE YAMANAKA 2017년 10월 19일
댓글: Stephen23 2017년 10월 19일
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,

채택된 답변

Stephen23
Stephen23 2017년 10월 19일
편집: Stephen23 2017년 10월 19일
double(M)
where M is your logical matrix. For example:
>> M = [true,false,true]
M =
1 0 1
>> double(M)
ans =
1 0 1

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 数値型에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!