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
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

Implementation of binary search: The binary search can be implemented as a recursive function. The recursive function below also implements this binary search algorithm. It re

Technique to create Nested structures: This technique is the most proficient. Though, the other technique is to build the nested structure one field at a time. As this is a ne

Image Processing: The Images are represented as grids, or matrices, of picture elements (known as pixels). In MATLAB an image usually is represented as a matrix in which each

FOR Loop: The for loop, or the for statement, is used whenever it is essential to repeat statement(s) in the script or function, and whenever it is known ahead of time how man

Example of Menu driven modular program: As an illustration of such a menu-driven program, we will write a program to discover the constant e. The constant e, known as the n

I dont know how to input different videos on matlab program

str2num function - String: The function str2num does the opposite; it takes the string in which a number is stored and converts it to the type double: >> num = str2num('123.

1. Write a MATLAB function (upperTriangle) using the functions you previously created to convert a matrix to upper triangular form. Start with row 1, column1. Find the row that has

Application: Menu driven Modular Program Numerous longer, more involved programs which have interaction with the user are menu-driven, that means that the program prints a men