Problem 10. Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return false otherwise.
Examples:
Input x = [-3 0 7]
Output tf is true
Input x = [2 2]
Output tf is false
Solution Stats
Problem Comments
-
38 Comments
Show
35 older comments
Ashish
on 5 Mar 2024
Great problem
Piyush
on 5 Mar 2024
great problem
Jason
15 hours and 24 minutes ago
They really need to do a better job explaining the requirements. For example they should state that the output for tf should be a logical "1" or "0"; logical(1) or logical (0), as it does appear they want a string when reading the instructions.
Solution Comments
Show commentsProblem Recent Solvers21305
Suggested Problems
-
3247 Solvers
-
Sum of diagonal of a square matrix
1589 Solvers
-
659 Solvers
-
1570 Solvers
-
928 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!