Function ismember - set operations, Other Engineering

Assignment Help:

function ismember - set operations:

The function ismember receives two vectors as input arguments, and returns a logical vector which is of similar length as the first argument, having 1 for true when the element in the first vector is also in the second, or 0 for false when not.

The order of arguments matters for this function.

>> v1

v1 =

2 3 4 5 6

>> v2

v2 =

1 3 5 7

>> ismember(v1,v2)

ans =

0 1 0 1 0

>> ismember(v2,v1)

ans =

0 1 1 0

 

By using the answer from the ismember function as an index into the first vector argument will return similar result as the intersect function.

>> logv = ismember(v1,v2)

logv =

0 1 0 1 0

>> v1(logv)

ans =

   3         5

>> logv = ismember(v2,v1)

logv =

0 1 1 0

>> v2(logv)

ans =

   3     5


Related Discussions:- Function ismember - set operations

#title. pid controller matlab coding for second order equat, can i get pr...

can i get prportional and integral controller matlab coding to solve my load flow analysis

Flight dynamics - introduction, In the Aircraft Performance course, the air...

In the Aircraft Performance course, the aircraft was assumed to be in a steady-state (e.g. steady  cruise, climb, turn, glide), with the forces and moments balanced. The subject of

Vertical shaft rotary kiln method, Explain the process of manufacturing ord...

Explain the process of manufacturing ordinary Portland cement by vertical shaft rotary kiln method and write chemistry of hardening and setting of it with chemical equations.  D

Int. finance management, Discuss the roles of international financial syste...

Discuss the roles of international financial system in international business

Various cementing materials, The various cementing materials are classified...

The various cementing materials are classified as follows. a) Argillaceous cementing materials b) Calcareous cementing materials c) Carbonaceous cementing materials Argillaceous Ma

The compression after impact test, This Compression After Impact (CAI) test...

This Compression After Impact (CAI) test fixture was developed by the Boeing Company. The specimen, typically, but not necessarily, a quasi-isotropic laminate, is 6" long, 4" wide,

Finance choice, Question #1 Which of the following statements is false? ...

Question #1 Which of the following statements is false? A) For corporations, interest paid on its debt is a tax deductible expense. B) For corporations, dividend paid on its

Blow moulding and thermoforming process, Q . Write short note on blow moldi...

Q . Write short note on blow molding. OR Explain the Thermoforming process.   What are the plastic fabrication method write in brief with neat sk

Constellation, Expertsmind.com brings you unique solution in electrical e...

Expertsmind.com brings you unique solution in electrical engineering -          A constellation is a region of the sky with well defined borders; familiar star pat

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