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

Armature cipl, in which type of armature winding Equaliser ring dummy coils...

in which type of armature winding Equaliser ring dummy coils are used

Relaibilty , can u help me with a reliabilty assignment

can u help me with a reliabilty assignment

Propeller efficiency, PROPELLER EFFICIENCY: The propeller is 80 - 87% e...

PROPELLER EFFICIENCY: The propeller is 80 - 87% efficient up to approximately 400 mph.  Generally, beyond this performance will fall off, although new materials and improved bl

Civil engineering, how to prepare assignment note on culverts in between 4 ...

how to prepare assignment note on culverts in between 4 to 6 pages

Statistical Quality control, Pls solve the problem 13-7 in Statistical Qual...

Pls solve the problem 13-7 in Statistical Quality control by Montgomery

Aviation legislation - dealer’s certificate , DEALER'S CERTIFICATE Refere...

DEALER'S CERTIFICATE Reference: When the sale of an aircraft involves flight without a Certificate of Registration, The C.A.A. will permit the aircraft to fly under certain re

Limitations of the powder metallurgy process, Q. What are the limitations o...

Q. What are the limitations of the powder metallurgy process ? How are some of these overcome ? Ans. Limitations : 1. Dies and equipment costs are high. So, the process

Crystal symmetry, Q.   Define the crystal symmetry with reference to crys...

Q.   Define the crystal symmetry with reference to crystal structure. Ans.CRYSTAL SYMMETRY: A crystal is an orderly array of atoms in space. Atoms organize themselves in an

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