When the input is true, return 'on', otherwise, return 'off'.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers514
Suggested Problems
-
Return the largest number that is adjacent to a zero
5527 Solvers
-
Find state names that end with the letter A
1198 Solvers
-
First non-zero element in each column
962 Solvers
-
Set some matrix elements to zero
637 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14130 Solvers
More from this Author31
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
The problem statement is misleading. 'if x' and 'if isequal(x, true)' are different conditions.