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

Kan bans in manufacturing enviornment, what are the advantages of dual-card...

what are the advantages of dual-card Kanban system campared to single card in a manufacturing environment

Propeller control in aircraft engine, Propeller control : CONSTANT SPE...

Propeller control : CONSTANT SPEED UNIT: In the normal flight range, the main control of the propeller is exercised by the propeller control unit (PCU). MANUAL AND AU

Diffusion, distingush between short range and long range diffusion

distingush between short range and long range diffusion

Dsd subject, give me basic programming of vhdl

give me basic programming of vhdl

Thermodynamics.., Steam enters in the turbine at 6 MPa and 450 deg C and ex...

Steam enters in the turbine at 6 MPa and 450 deg C and expands at some intermediate pressure 60 % of steam is extracted and remainder expands to 10 kPa at this Investigate the effe

Matlab coding, create 22 elements in scalar hint:for loop or any loop state...

create 22 elements in scalar hint:for loop or any loop statement and append to previous variable element by elements

Restoration of clipped speech signal, Restoration of clipped speech signal ...

Restoration of clipped speech signal using linear prediction

Time value money, I want to buy a car. The Msrp is $31,000. I pay $516 per ...

I want to buy a car. The Msrp is $31,000. I pay $516 per month for five years. The quoted apr is 6.9%. I put down $800. How much did I pay for the car?

Drowsiness detection Device using image processing (Matlab), Hi. I am a fin...

Hi. I am a final year student seeking help with my project. I am supposed to make a device that can detect the eye state of a person to determine whether he/she is sleepy/drowsy, P

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