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
I have a 400x2 vel.dat and 20x2 xy.dat file, how can i plot a streamslice graph on matlab with this two files.

Illustration of anonymous functions: Dissimilar functions stored in the M-files, when no argument is passed to an anonymous function, the parentheses should still be in the fu

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Executing a program: Running the program would be completed by typing the name of the script; this would call the other functions: >> calcandprintarea Whenever prompt

Logical scalar values: The MATLAB also has or and and operators which work element wise for the matrices: These operators will compare any of the two vectors or matric

readlenwid function: function call: [length, width] = readlenwid; function header: function [l,w] = readlenwid In the function call, not any argument is passed; henc

Set Operations: The MATLAB has numerous built-in functions which perform set operations on vectors. These involve intersect, union, setdiff, unique, and setxor. All these func

Comparing strings: There are few functions which compare strings and return logical true when they are equivalent or logical false when not. The function strcmp compares the s

Reading from a Mat-File: The load function is used to read from various types of files. As with save function, by default the file will be supposed to be a MAT-file, and load

A matlab function to calculate filter order