how to convert matrix to binary matrix?
4 views (last 30 days)
Show older comments
Firas Al-Kharabsheh
on 26 Apr 2016
Edited: Azzi Abdelmalek
on 26 Apr 2016
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 ]
0 Comments
Accepted Answer
Azzi Abdelmalek
on 26 Apr 2016
Edited: Azzi Abdelmalek
on 26 Apr 2016
A_C=~~A
Or
A_C=logical(A)
0 Comments
More Answers (0)
See Also
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!