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
Seven years ago, after 15 years in public accounting, Stanley Booker, CPA, resigned his posiition as Manager of Cost Systems for Davis, Cohen, and O''Brien Public Accountants and s

It is recommended that if possible you should buy a copy of this book. It will prove useful for the new fourth year configurational aerodynamics module also. Blackwells bookshop ha

what are basic think to select the bjt as switch

Causes of unbalance Unbalance may be caused by a variety of factors occurring singly or in combination with others. These factors include:- a) Eccentricity Eccentricity

2-17 Given a wind speed of 5.0 m/s at 2 m above the ground and a roughness length of 0.8 cm, compute (a) the friction velocity, in centimeters per second, and (b) the wind speed, i

The resistance of the strain gauges is usually measured with a Wheatstone bridge. All bridges have balancing circuits which can be apex or parallel. Both methods are equivalent.

why we use h for bjt

FLIGHT FINE PITCH STOP FAILURE (OVERSPEED) An overspeed is prevented by an automatic coarsening device. A switch mounted on the Hub closes when the blade angle is below Flig

Sprinkler system - fire protection engineering Sprinkler systems may be installed in a building to achieve a number of different objectives.  Very often the primary reason for

Spinning Reticle Seekers  A spinning reticle seeker contains a single thermal detector and a spinning patterned disk - such as the ‘Rising Sun' Reticle.   - consis