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

Modulus of rupture, description about modulus of rupture machine & differen...

description about modulus of rupture machine & different parts of bending strength machine

Case study, Which type of financing is appropriate to each firm?

Which type of financing is appropriate to each firm?

Pn junction diode, Solving Poisson''s equation find out electric field in t...

Solving Poisson''s equation find out electric field in the transition region and show that electric field is maximum at the junction of p-n diode

Digtal electronics, Design a combinational logic circuit that will generate...

Design a combinational logic circuit that will generate the square off all the combinations of three bit binary number represented by A,B,C

Engineering Management, what is the best Master thesis that can be done i...

what is the best Master thesis that can be done in this major ?I need suggestions regards

Excel, How do I finish a tough Engineering assignment in excel?

How do I finish a tough Engineering assignment in excel?

Blanking, Blanking involves cutting of the sheet metal along a closed outl...

Blanking involves cutting of the sheet metal along a closed outline in a single step to separate the piece from the surrounding stock. As shown in figure, the path that is cut out

What processes shape earth’s surface, Expertsmind.com brings you unique so...

Expertsmind.com brings you unique solution in physicsWhat processes shape Earth's surface? What processes shape Earth’s surface? -Impact craters: bowl-shaped cr

Priority scheduling- operating system, Operating System Assignment# Priorit...

Operating System Assignment# Priority Scheduling leads to the risk of starvation: a process is ready, but never is given the processor. Some preemptive priority schedulers therefor

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