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

Gsm alarm system with video surveillance, i am building the above mentioned...

i am building the above mentioned system and i intend using an arduino board together with the gsm shield. my problem is i don''t know if there is a way i can control a camera by p

Infiltration enters, ways via which infiltration enters a sewer system

ways via which infiltration enters a sewer system

Aerofoil aerodynamics – low speed flows, We now have some idea about what m...

We now have some idea about what models are available to simulate the flow over an aerofoil, and also how to use the Hanley package to apply these methods. Keep referring to you

Engineering mechanics questions, I need help in engineering mechanics quest...

I need help in engineering mechanics questions? Do you provide homework help, Please let us know how do i get it quich time...

Avionic systems design- stability derivatives, The idea of stability deriva...

The idea of stability derivatives is to approximate the general functional relationship between any force ormoment variable and the dynamic or control variables as a Taylor series

High level design for an SME network, my course is master in telecommunicat...

my course is master in telecommunication and i need it today is it possible?

Differentiate crystalline and amorphous materials, Q.   Differentiate cryst...

Q.   Differentiate crystalline and amorphous materials? (a)Crystalline solids:  Those solids in which the, ions atoms or molecules in a definite regular repeated

Personal Financial Management Math College Level, How do you find initial m...

How do you find initial monthly payment for the second year after an adjustable-rate mortgage?

Compressor stall and surge of aircraft, Compressor stall and surge: ‘Su...

Compressor stall and surge: ‘Surge' can occur in both centrifugal and axial flow compressors and is the reversal of the airflow in the compressor. It is a very undesirable con

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