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

Assignment Help:

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


Related Discussions:- Function setxor and set function unique - set operations

Cro probes, #questiodescribe different types of cro probes

#questiodescribe different types of cro probes

Lock Clip Came out from Rear Brake Drum (Backplate) , A type of brake used ...

A type of brake used to keep the vehicle from rolling when it is parked. The standard Parking brake locks the rear wheels to keep the car from moving. Parking brake cable is fixed

Principles of finance, "Suppose an investor acquired 1 Round lot of Walden ...

"Suppose an investor acquired 1 Round lot of Walden stock at $30/share last year. If the investor received a $1.00 per share dividend during the year and sells the shares at year-e

Automatic synchronising - propellers, AUTOMATIC SYNCHRONISING: Automa...

AUTOMATIC SYNCHRONISING: Automatic Synchronisation uses engine driven synchronising alternators to detect electrically any increase or decrease in a slave engine's speed.  Ea

Risk Analysis, how would I find assistance with such toics as: probability ...

how would I find assistance with such toics as: probability assessment methods, risk modeling, stochatic dominance and multi-attribute methods?

engneering mechanics, the speed of an object at the end of 4 succesive sec...

the speed of an object at the end of 4 succesive seconds is 2o,25,3o and 35 m/sec respectvly, what is the acceleration of this object?

Civil construction, what a problem when we do a construction project

what a problem when we do a construction project

Mode ii interlaminar fracture , The Mode II fracture toughness is measured ...

The Mode II fracture toughness is measured using the ENF  Typically, the specimen length is 120 mm, the width B is 20 mm, the thickness is between 3 and 5 mm and the distance be

Manufacturing technology, explain any two finishing processes in detail wit...

explain any two finishing processes in detail with neat diagram

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd