Function issorted - set operations, MATLAB in Engineering

Function issorted - set operations:

The function issorted will return 1 for logical true when the argument is sorted in ascending order (minimum to maximum), or 0 for false when not.

>> v3 = [1:5 3:6]

v3 =

1 2 3 4 5 3 4 5 6

>> issorted(v3)

ans =

   0

>> issorted(v1)

ans =

   1

>> vec = 4:-1:1

vec =

4 3 2 1

>> issorted(vec)

ans =

   0

Posted Date: 10/22/2012 7:35:39 AM | Location : United States







Related Discussions:- Function issorted - set operations, Assignment Help, Ask Question on Function issorted - set operations, Get Answer, Expert's Help, Function issorted - set operations Discussions

Write discussion on Function issorted - set operations
Your posts are moderated
Related Questions
IS Functions for Strings: There are many functions for strings, that return logical true or false. The function isletter returns the logical true when the character is a lette

Storing Strings in Cell Arrays: The one good application of a cell array is to store strings of various lengths. As cell arrays can store various types of values in the elemen

printrectarea function: function call: printrectarea(length, width) function header: function printrectarea(len, wid)   In the function call, there are two argume


Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,

Matrix Multiplication: The Matrix multiplication does not mean multiplying term by term; and it is not an array operation. The Matrix multiplication has a very particular mean

Passing Structures to Functions: The whole structure can be passed to a function, or separate fields can be passed. For illustration, here are the two distinct versions of a f

Replacing a string - function strrep: The function strrep finds all the occurrences of a substring within the string, and substitutes them with a new substring. The order of a

Finding a sting - function findstr: The function findstr receives two strings as input arguments. It finds all the occurrences of shorter string contained by the longer, and r

Example of Interpolation and extrapolation: The MATLAB has a function to do this, known as polyfit. The function polyfit finds the coefficients of the polynomial of the partic