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
-
First non-zero element in each column
963 Solvers
-
Number of 1s in a binary string
11417 Solvers
-
565 Solvers
-
07 - Common functions and indexing 2
423 Solvers
-
368 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.