Illustration of set operations, MATLAB in Engineering

Illustration of Set operations:

For illustration, given the vectors as shown below:

>> v1 = 2:6

v1 =

2  3  4  5  6

>> v2 = 1:2:7

v2 =

1  3  5  7

The union function returns a vector which contains all the values from the two input argument vectors, without replicating any.

>> union(v1,v2)

ans =

1 2 3 4 5 6 7


Posted Date: 10/22/2012 7:31:30 AM | Location : United States

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

Write discussion on Illustration of set operations
Your posts are moderated
Related Questions
Dot Product: The dot or inner product of two vectors a and b is written as a • b and is defined as  In another words, this is like matrix multiplication when multiplyi

Calling of Function polyval: The curve does not appear very smooth on this plot, but that is as there are only five points in the x vector. To estimate the temperature

Algorithm for subfunction: The algorithm for subfunction askforn is as shown:  Prompt the user for the positive integer n.  Loop to print an error message and reprom

Simplification Functions: There are numerous functions which work with expressions, and simplify the terms. Not all the expressions can be simplified, but the simplify functio

Algorithm for expfn function: The algorithm for expfn function is as shown:  receives the value of x as the input argument.  Prints the value of exp(x).  assigns a

Gauss-Jordan: The Gauss-Jordan elimination technique begins in similar way which the Gauss elimination technique does, but then rather than of back-substitution, the eliminati

Individual structure variable: The individual structure variable for one software package may look like this: The name of the structure variable is a package; it has f

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,

Tracing of Square matrices: The trace of a square matrix is the addition of all the elements on the diagonal. For illustration, for the preceding matrix it is 1 + 6 + 11 + 16,

Subfunctions: Though, it is possible to have more than one function in a given M-file. For illustration, if one function calls the other, the first function would be the prima