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
-
39 Comments
Show
36 older comments
Piyush
on 5 Mar 2024
great problem
Jason
on 5 Mar 2025 at 16:45
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.
Dyuman Joshi
on 6 Mar 2025 at 13:09
@Jason, in MATLAB true and false are equivalent to 1 or logical(1) and 0 or logical(0) respectively -
https://in.mathworks.com/help/matlab/ref/true.html#description
https://in.mathworks.com/help/matlab/ref/false.html#description
Solution Comments
Show commentsGroup

Cody Challenge
- 12 Problems
- 465 Finishers
- Add two numbers
- Find the sum of all the numbers of the input vector
- Quote Doubler
- De-dupe
- Cell joiner
- Remove all the words that end with "ain"
- Nearest Numbers
- Find state names that start with the letter N
- Word Counting and Indexing
- Given two arrays, find the maximum overlap
- It dseon't mettar waht oedrr the lrettes in a wrod are.
- Counting in Finnish
Problem Recent Solvers21330
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!