Problem 2407. Integer to boolean
Write a general function that will create the following conversation;
Input is a column vector with integers Output is a boolean matrix
1234 = 1 1 1 1 23 = 0 1 1 0 14 = 1 0 0 1 12 = 1 1 0 0
Also study the test suite to a better understanding of the problem
Solution Stats
Problem Comments
-
1 Comment
Rafael S.T. Vieira
on 28 Aug 2020
The author should probably add a case where the first position of x does not contain the maximum column position.
Solution Comments
Show commentsProblem Recent Solvers39
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
48174 Solvers
-
Maximum running product for a string of numbers
2142 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1039 Solvers
-
200 Solvers
-
construct matrix with identical rows
195 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!