ベクトルの値が増加している場合 (ベクトルの各要素が前の要素よりも大きい場合) には true を、そうでない場合には false を返すようなコードを書いてみましょう。
例:
入力が x = [-3 0 7] のとき、 関数の出力 tf は true を返します。
入力が x = [2 2] のとき、 関数の出力 tf は false を返します。
- (英語版) Problem 10. Determine whether a vector is monotonically increasing https://www.mathworks.com/matlabcentral/cody/problems/10-determine-whether-a-vector-is-monotonically-increasing
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers362
Suggested Problems
-
Create a cell array out of a struct
2412 Solvers
-
Arrange vector in ascending order
816 Solvers
-
439 Solvers
-
Back to basics - mean of corner elements of a matrix
460 Solvers
-
Find out sum of all elements of given Matrix
533 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
日本語うれしいですっ☆☆☆