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

Homework, Assume that a movie is two hours long, that the frame rate is 30 ...

Assume that a movie is two hours long, that the frame rate is 30 frames per second, and that the resolution per frame is 1080i (1920×1080 pixels per frame), and that each pixel is

Finance.., hi, I need to do this question but I couldn''t capable to do i...

hi, I need to do this question but I couldn''t capable to do it. so can you tell me how much money I can give you to be done? How would you value the price of a Microfinance I

Balanced investment strategy, Balanced Investment Strategy Portfolio manage...

Balanced Investment Strategy Portfolio management strategy where all assets are owed with the aim of avoiding excessive risk by diversifying investment athwart different asset clas

Apu engine, APU Engine APU engines usually consist of a centrifugal com...

APU Engine APU engines usually consist of a centrifugal compressor and a radial turbine however, axial compressors and turbines may be added or used in their own right. Centrif

The impact and post-impact behaviour of composites , The Impact and Post-im...

The Impact and Post-impact Behaviour of Composites  Many early studies involved doing Charpy tests on small notched samples. This is a destructive test of impact resistance, co

Iosipescu shear test, A second way to determine the shear modulus is to use...

A second way to determine the shear modulus is to use the Isopescu shear test. The sample is placed in a jig and loaded as shown. Under load, a region of pure shear exists

Techniques of capital budgeting, Techniques of capital budgeting There are ...

Techniques of capital budgeting There are a number of capital budgeting techniques used in the evaluation of a project. They are broadly classified under two categories: 1] Discoun

Fire safety log book, Fire safety log book: The occupier's fire safety...

Fire safety log book: The occupier's fire safety log book should be checked during an inspection to see that the system is being tested regularly and serviced and maintained a

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