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

Extractive metallurgy, differences between blast , reverbatory and electric...

differences between blast , reverbatory and electric furnaces

Facilty design, List three advantages and three disadvantages of open offic...

List three advantages and three disadvantages of open office spaces.

Grain growth, Q. Explain the grain growth. Ans. Grain growth: After R...

Q. Explain the grain growth. Ans. Grain growth: After Recrystallization is complete, the strain free grains will continue to grow if the metal specimen is left at elevated te

Excel, How do I finish a tough Engineering assignment in excel?

How do I finish a tough Engineering assignment in excel?

Comparison of petrol engines and diesel engines, COMPARISON OF PETROL ENGIN...

COMPARISON OF PETROL ENGINES AND DIESEL ENGINES 1.      In petrol engine, a mixture of air and petrol is drawn into the cylinder and compressed, whereas in case of diesel eng

Process control, sir how can I find the transfer function of control valve

sir how can I find the transfer function of control valve

The pitch change mechanism , THE PITCH CHANGE MECHANISM : The cylinder...

THE PITCH CHANGE MECHANISM : The cylinder backplate . The disc shaped backplate provides a mounting for the pitch change cylinder. This backplate fits in front of the propel

Electromagnetic spectrum , Electromagnetic Spectrum: Visible light belo...

Electromagnetic Spectrum: Visible light belongs to a family of waves known as the electromagnetic spectrum. Other members of this family include high frequency short wavelength

Difference between elastic and plastic deformation, Q. State difference bet...

Q. State difference between elastic and plastic deformation. Ans. Elastic deformation: Elastic deformation is that the part of the deformed material, when the applied load is

Evacuation of a high rise building - means of escape, Evacuation of a high ...

Evacuation of a high rise building - means of escape: Evacuation of a high rise building is likely to be split into two or more phases.  Initially, when the alarm activates (f

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