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
1 hour and 8 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 Solvers21301
Suggested Problems
-
1329 Solvers
-
1247 Solvers
-
Find the sum of the elements in the "second" diagonal
1159 Solvers
-
524 Solvers
-
Is this is a Tic Tac Toe X Win?
513 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!