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

Invalidation of certificate of airworthiness, INVALIDATION OF CERTIFICATE O...

INVALIDATION OF CERTIFICATE OF AIRWORTHINESS Listed below are the four major reasons why a Certificate of Airworthiness could become invalid. There may be other specific reason

Flight control - linear system, Representations of a linear system The ...

Representations of a linear system The linear system of Section is shown in block diagram To determine the responseof the output of the system y(t) to an input u(t) the initial

Vibration , ME 312 Project: Design for Vibration and Shock Suppression (Due...

ME 312 Project: Design for Vibration and Shock Suppression (Due Sunday 6/5/2012) Introduction To protect the electronic control module from fatigue and breakage, it is desirable

Low pressure turbine clearance control valve - aircraft, Low pressure turbi...

Low pressure turbine clearance control valve: At take-off and low altitude the valve is in its normal closed position allowing cooling airflow to the core compartment. When an

Die press assembly , how to make Die Press Assembly Drawing in autocad?

how to make Die Press Assembly Drawing in autocad?

Chromizing, advantages and disadvantages

advantages and disadvantages

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

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

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