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

Various cementing materials, The various cementing materials are classified...

The various cementing materials are classified as follows. a) Argillaceous cementing materials b) Calcareous cementing materials c) Carbonaceous cementing materials Argillaceous Ma

Synchro resolvers for low load, Synchro resolvers for low load: Both tr...

Synchro resolvers for low load: Both transmitter and receiver rotors are energised by the same AC supply and will induce equal and opposing voltages in the stator coils provide

Facilty design, List three advantages and three disadvantages of open offic...

List three advantages and three disadvantages of open office spaces.

Design, 10 vertical examples

10 vertical examples

Diffraction of light, what do you mean by diffraction of light? what is the...

what do you mean by diffraction of light? what is the diffrence between interference and diffraction of light?distinuish between Fresnel''s and Fraunhofer''s diffraction.

Principles of sprinkler systems-fire safety engineering, Principles of Spri...

Principles of Sprinkler Systems-Fire safety Engineering Sprinkler systems may be installed in a building to achieve a number of different objectives.  Very often the primary r

Speed control in aircraft engine, Speed control in Aircraft Engine: Bec...

Speed control in Aircraft Engine: Because the APU is designed to run at a constant rpm, some means must be provided to control this speed. Such a control device is known as a

What are debentures?, What are debentures?  A Debenture is " A document ...

What are debentures?  A Debenture is " A document of contract of loans which is given under the organization's press and provides a venture that the debenture owner will get a s

Continuous casting, Continuous Casting : In essential, the process consist...

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

Why would an investor buy preferred stock?, Why would an investor buy prefe...

Why would an investor buy preferred stock? A buyer that wants the benefit potential of value but wants to reduce possibility would buy recommended inventory. The buyer would rec

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