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

Determine the log mean temperature, A tubular heat exchanger is being used ...

A tubular heat exchanger is being used for heating a liquid food from 30 o C to 70 o C. The temperature of the heating medium decreases from 90 o to 60 o C. a) Is the flow conf

Biotechnology engineering project, I want a project which is related to bio...

I want a project which is related to biotech engineering.. Something like designing or inventing .

Analog digital converter , Analog digital converter  Analog digital con...

Analog digital converter  Analog digital converter digitises the conditioned signal and presents it in a digital form, which is more convenient for long distance transmission,

Engine lubrication systems - air craft engine , Engine lubrication systems ...

Engine lubrication systems There are basically two types of lubrication system at present in use in gas turbine engines:- a) Recirculatory. In this system, oil is distribut

What is the meaning of context-awareness, Question : (a) The Guide proj...

Question : (a) The Guide project has been developed to provide city visitors with a hand-held context-aware tourist guide. (i) In this case, what is the meaning of context-a

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

explain the fibre optic communication system with block diagram

Difference between fin and swell, Difference Between Fin and Swell    ...

Difference Between Fin and Swell          Swell : The unintentional bulges found on the casting surfaces are known as swells. Such enlargements on the casting surface are cau

Aeronautical, apply equations to solve problems for specified aerodynamic a...

apply equations to solve problems for specified aerodynamic applications. Need some inputs regarding this.

Difference amplifier, Difference amplifier: Figure shows how two inputs...

Difference amplifier: Figure shows how two inputs can be subtracted. This circuit differs from previous types with negative feedback in that the non-inverting terminal is not

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