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

External air tappings - aircraft engine , External air tappings: Engine...

External air tappings: Engines vary as to the number of external air tappings and their usage. The following notes are taken from the Pratt and Whitney JT9D but have been simp

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,

Power engine - aircraft maintenance, Power Engine: Power producing engi...

Power Engine: Power producing engines come in two main forms Turboprop and turboshaft. a. Turboprop Engines. Turboprop engines extract most of the energy from the gas stream

electronics and communication, I want to join.Please help me in completing...

I want to join.Please help me in completing the process

Tube drawing, Drawing operation can also be used for reducing the tube cros...

Drawing operation can also be used for reducing the tube cross-section. The drawing equipment consists of draw bench and die. One end of the tube is pulled through the die over a f

Skin-core debonding in sandwich structures, If the skins are peeled from th...

If the skins are peeled from the core, a sandwich structure loses its strength and stiffness. This can occur under - wave-slamming in fast ferries - rapid depressurisati

Dsp, find IDFT of the sequence X(k)={5,0,1,-j,0,1,0,1,j,0}

find IDFT of the sequence X(k)={5,0,1,-j,0,1,0,1,j,0}

Programming of 18F4550, #include org 0xoo movlw 0x00 ---------- movlw 0xff ...

#include org 0xoo movlw 0x00 ---------- movlw 0xff movwf PORTB end

Derivatives- vertical spread, Let C (K ) denote a European vanilla Call opt...

Let C (K ) denote a European vanilla Call option with strike price K . Assume that all options are identical except for strike price, and strike prices satisfy K ??Question 1 [5 m

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