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
Example of Gauss-jordan: For a 2×2 system, this would results and for a 3 × 3 system, Note that the resulting diagonal form does not involve the right-most col

Example to change the line width from the default: For illustration, to change the line width from the default of 0.5 to 1.5: >> set(hl,'LineWidth',1.5) As long as the

Illustration of Image processing: This displays that there are 64 rows, or in another word, 64 colors, in this specific colormap. It also displays that the first five colors a

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

Finding a sting - function strfind: The function strfind does necessarily similar thing, except that the order of the arguments does make dissimilarity. The common form is str

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

Illustration of if - else statement: The one application of an if-else statement is to check for errors in the inputs to a script. For illustration, a former script prompted t

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


Splits a string : The strtok function splits a string into pieces; it can be called in many ways. The function receives one string as an input argument. It appears for the fir