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

#title.electronic devices., Advantages and dis advantages of a diode in ser...

Advantages and dis advantages of a diode in series /shunt

Cell arrays matlab, Expertsmind.com offers  Cell Arrays matlab assignment ...

Expertsmind.com offers  Cell Arrays matlab assignment help In matlab, Cell arrays are just like frequent arrays in that they are "indexed" details of information, with an out

Water traetment, what are the different phosphates used in water treatment?...

what are the different phosphates used in water treatment?

Phase array modelling, QUESTION: Modelling of phase array antenna for medic...

QUESTION: Modelling of phase array antenna for medical imaging. INSTRUCTION: The expert must provide a correct mathematical model solution and detail by detail steps of how it can

Transistors, Transistors: The transistor can be a high or low resistanc...

Transistors: The transistor can be a high or low resistance device, hence the name, which is derived from TRANSfer resISTOR.  It is used in many switching and amplifier circ

Means of escape, Means of escape: The means of escape can start at any...

Means of escape: The means of escape can start at any point inside a building where there may be people.      The means of escape end when 'ultimate safety' is attained out

Flight dynamics - velocity component, Force, Moment, Velocity and Angular V...

Force, Moment, Velocity and Angular Velocity Components • Aerodynamic Force Components - X, Y, Z • Velocity Components - U, V, W (or Vx, Vy, Vx) • Angular Velocity Components - P,

Deformation of metals, Q. Explain the following with reference to deformati...

Q. Explain the following with reference to deformation of metals:                         (1) Preferred orientation                         (2) Elastic after effect

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