Function setxor and set function unique - set operations, Other Engineering

Function setxor and set function unique:

The function setxor receives two vectors as input arguments, and returns a vector having all the values from the two vectors which are not in the intersection of these two vectors. In another word, it is the union of two vectors obtained by using setdiff former!

>> setxor(v1,v2)

ans =

1 2 4 6 7

>> union(setdiff(v1,v2), setdiff(v2,v1))

ans =

1 2 4 6 7

The set function unique returns all the exclusive values from the set argument:

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

v3 =

1 2 3 4 5 3 4 5 6

>> unique(v3)

ans =

1 2 3 4 5 6

Most of the set functions return vectors which can be used to index into the original vectors as optional output arguments; for illustration, for the two vectors v1 and v2 defined formerly as:

>> v1

v1 =

2 3 4 5 6

>> v2

v2 =

1 3 5 7

Posted Date: 10/22/2012 7:33:27 AM | Location : United States







Related Discussions:- Function setxor and set function unique - set operations, Assignment Help, Ask Question on Function setxor and set function unique - set operations, Get Answer, Expert's Help, Function setxor and set function unique - set operations Discussions

Write discussion on Function setxor and set function unique - set operations
Your posts are moderated
Related Questions
A concrete block manufacturer operates a natural gas-fired furnace-type curing kiln (rated at 20 Mbtu/hr) and consumes 820, 000, 000 cubic meters of fuel annually.  Being similar t

How to calculate the depth of a masonry dam of trapezoidal cross section with height of 24ft,2ft top width,,12 ft base width and weight of concrete 150 lb/ft^3.The resultant pressu

With the help of circuit diagram and the waveforms,explain the working of a negative clipper with positive biasing voltage.also explain the Same concept in series clipper circuit

Q. What are the commented carbides? How are they processed? Ans. These are very important products of powder metallurgy and finds wide applications as cutting tools, wir

To achieve successful results in powder metallurgy the metallic powder must be thoroughly homogenized. The term blending and mixing are both used in this content. Blending refers t

apply equations to solve problems for specified aerodynamic applications. Need some inputs regarding this.

simplied hybrid model of cc amplifier

Drawing operation can also be used for reducing the tube cross-section. The drawing equipment consists of draw bench and die. One end of the tube is pulled through the die over a f

Continuous Casting : In essential, the process consists of pouring molten metal into a short vertical metal die or mould (at a controlled rate), which is open at both ends, coolin

A diffraction grating is an optical element that diffracts light into its constituent wavelength (colors). It is an excellent device used in laboratory to study the spectra. Co