Publisher review:ismonotonic determines whether or not a vector or matrix is monotonically increasing or decreasing. ISMONOTONIC(X) returns a boolean value indicating whether or not a vector is monotonic. By default, ISMONOTONIC returns true for non-strictly monotonic vectors, and both monotonic increasing and monotonic decreasing vectors. For matrices and N-D arrays, ISMONOTONIC returns a value for each column in X.ISMONOTONIC(X, 1) works as above, but only returns true when X is strictly monotonically increasing, or strictly monotonically decreasing.ISMONOTONIC(X, 0) works as ISMONOTONIC(X).ISMONOTONIC(X, [], 'INCREASING') works as above, but returns true only when X is monotonically increasing.ISMONOTONIC(X, [], 'DECREASING') works as above, but returns true only when X is monotonically decreasing.ISMONOTONIC(X, [], 'EITHER') works as ISMONOTONIC(X, []).ISMONOTONIC(X, [], [], DIM) works as above, but along dimension DIM.NOTE: Third input variable is case insensitive, and partial matching is used, so 'd' would be recognised as 'DECREASING' etc..EXAMPLE:x = [1:4; 6:-2:2 3]ismonotonic(x)ismonotonic(x, [], 'i')ismonotonic(x, [], [], 2)x =1 2 3 46 4 2 3ans = 1 1 1 1ans =1 1 0 0ans =10 Requirements: ยท MATLAB Release: R14SP3
ismonotonic 1.1 is a Matlab script for Mathematics scripts design by Richie Cotton.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris