how to convert matrix to binary matrix?

1 次查看(过去 30 天)
if i have this matrix
A = [ 0 5 0 1
6 7 2 0
0 0 4 1 ]
HOW CAN I CONVERT IT TO THIS BY REPLACE THE NUMBER > 1 TO ONE LIKE A_C
A_C = [ 0 1 0 1
1 1 1 0
0 0 1 1 ]

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-4-26
编辑:Azzi Abdelmalek 2016-4-26
A_C=~~A
Or
A_C=logical(A)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numeric Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by