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

Discuss the heuristic search as applied to an and/or graph, Question 1 Wha...

Question 1 What is Artificial Intelligence? Discuss the two class of approaches followed for AI Question 2 Discuss the heuristic search as applied to an AND/OR Graph Ques

Spindle Assembly, procedure to assemble the spindle in the cnc mzachine.......

procedure to assemble the spindle in the cnc mzachine.........

Difference between income & expenditure statement, Difference between incom...

Difference between income & expenditure statement P&L is to be ready by the Company or Dealing Origination which evolved in Dealing of any commodity or manufacturing of completed e

Metallurgy assignment, Hi I need someone to help me to do a metallurgy assi...

Hi I need someone to help me to do a metallurgy assignment

Co2 molds (carbon dioxide moulding), CO 2  Molds (Carbon dioxide Moulding...

CO 2  Molds (Carbon dioxide Moulding) is the process of hardening the moulds and cores by using carbon dioxide and sodium silicate liquid base binder is one of the most widely u

Signal modulation, Signal modulation Modulation involves the modificati...

Signal modulation Modulation involves the modification of some property of a (usually sinusoidal) carrier waveform. The process of recovering the original signal from the modul

What is call option?, What is Call Option? Calls give the client the rig...

What is Call Option? Calls give the client the right but not the responsibility to buy a given variety of the actual resource, at a given cost on or before a given upcoming time

VLSI, what is meant by VMOS

what is meant by VMOS

Variable interest rate, What is Variable Interest Rate? Interest rates whic...

What is Variable Interest Rate? Interest rates which is offered by banks or financial institutions on loans or deposits which are liable to change according to circumstances. For e

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