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

ALGORITHM, write an algorithm to find a number that multiplies your name 10...

write an algorithm to find a number that multiplies your name 10 times

. CFD, HOW TO MAKE ROTATING FRAME

HOW TO MAKE ROTATING FRAME

Sand casting, Sand castings are porous enough and, therefore, cannot be use...

Sand castings are porous enough and, therefore, cannot be used for pressure sight vessels. Structure obtained by sand casting is loose and hence not stranger than wrought products.

Traffic management, (a) Discuss the requirements, specifications and specia...

(a) Discuss the requirements, specifications and special requirements for the  design of arterial road networks and residential area street networks in a developing suburban region

Active clearance control system, Active clearance control system The sy...

Active clearance control system The system provides fan discharge air for cooling the core compartment and the low-pressure turbine case. At low altitudes the core engine requ

Binary cycle, Consider the binary cycle using the sodium and steam/water in...

Consider the binary cycle using the sodium and steam/water in the sketch below and operating at conditions in Table 1. Draw T S Diagram and find the thermal cycle efficiency

An essay on power train, Interior noise is basically airborne or structure-...

Interior noise is basically airborne or structure-borne. The excitation sources of vibratation and noise from engines can be divided as mechanical, combustion, and flow sources.

Hanning window, what is a procedure of solving the questions using hanning ...

what is a procedure of solving the questions using hanning window while designing a fir filter?

Air cannon launcher ansys analysis, Hello, I''m doing a project that needs ...

Hello, I''m doing a project that needs an ANSYS software for analysis calculation, is it possible to do me that if I provide you all the the information needed. Thank you

Water haedness, hardness of bore well water is less than sea water

hardness of bore well water is less than sea water

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