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

Apu powerplant installation, Apu powerplant installation: The APU engin...

Apu powerplant installation: The APU engine mounts consist of a number of supports with vibration isolators fitted to the end of each support. The tubular supports are bolted

Fibre optics communications, explain the fibre optic communication system w...

explain the fibre optic communication system with block diagram

Visualizing data matlab, expertsmind.com has Visualizing Data solution in ...

expertsmind.com has Visualizing Data solution in matlab All the design features that are required to picture technological innovation and clinical information are available in

Corporate finance., The firm is considering an investment opportunity. The ...

The firm is considering an investment opportunity. The investment falls in the same class of risk as the firm, the project is financed with equity and debt. Explain all the steps i

Sizing, Q. What is the purpose of :          (i) Sizing,            ...

Q. What is the purpose of :          (i) Sizing,                  (ii) Coining operations in powder metallurgy,         (iii) Infiltration,           (iv) Impregnati

Financial management, Sharpe Knife Company expects sales next year to be $1...

Sharpe Knife Company expects sales next year to be $1,500,000 if the economy is strong, $800,000if the economy is steady, and $500,000if the economy willb e strong, a 50 percent pr

Present worth equivalence in economical engineering, Present Worth equivale...

Present Worth equivalence: Since we have developed the relationship to find a future value F given a present value P, we can easily derive the formula to find a (P|F, i, n), w

Applications of De, What are the applications of de.moivres theorem in soft...

What are the applications of de.moivres theorem in software engineering,computer science,programming and computer engineering? if there are any applications,then,what are that?

What is treasury bills?, What is Treasury Bills? Treasury expenses are o...

What is Treasury Bills? Treasury expenses are one of the finance devices in temporary money market. It is unprotected promissory observe from the govt part of the RBI to satisfy

Physics, what is electrical transmission and electromagnetic radiation in t...

what is electrical transmission and electromagnetic radiation in the form of energy transfer?

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