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

Vibration analysis of aircraft, Vibration Analysis Gas turbine engines ...

Vibration Analysis Gas turbine engines have extremely low levels of vibration compared to piston engines. Changes in vibration levels could occur therefore without being notic

Aerofoil aerodynamics – low speed flows, We now have some idea about what m...

We now have some idea about what models are available to simulate the flow over an aerofoil, and also how to use the Hanley package to apply these methods. Keep referring to you

Payback period method, Non-discounted cash flow method, Payback period met...

Non-discounted cash flow method, Payback period method In this method, time value of money is not considered. It takes into account the number of years required to recover the in

Commercial buildings - fire protection engineering, Commercial buildings - ...

Commercial buildings - fire protection engineering: The term 'commercial buildings' refers to any buildings that are not residential buildings and that do not fall under the m

Power factor., how can decrease the power factor of any electric circuit

how can decrease the power factor of any electric circuit

Finance, Let C(K) denote a European vanilla Call option with strike price K...

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 (K1) What are the no-

Working of i.c. engine, WORKING OF I.C. ENGINE Basically there are 2 ty...

WORKING OF I.C. ENGINE Basically there are 2 types of internal combustion engines; the two stoke type and the 4-stroke type. A brief description of these is given below: 1.

Switching transistors, SWITCHING TRANSISTORS When a transistor is to be...

SWITCHING TRANSISTORS When a transistor is to be used as a switching device, it operates either as an open circuit (i.e. in the cut-off region) or as a short circuit (i.e. in t

Dischage rate, stuck on a project that requires 5 outputs with 6 inputs and...

stuck on a project that requires 5 outputs with 6 inputs and all formulas

Shelf list filing - library management, Shelf List Filing   Shelf list ...

Shelf List Filing   Shelf list reflects the arrangement of documents in the library. That is to say, the classificatory arrangement of the documents in a library can be seen th

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