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

Doble titration, object:THE NORMALITY OF STANDARD FAS SOLUTION(A)N/50.find ...

object:THE NORMALITY OF STANDARD FAS SOLUTION(A)N/50.find out the strenghth and normality of fas(b) using potasium permagnettetraoxide as intermidiate compound & self indicator

Applied Physics, what types of fringes will be formed if white light is use...

what types of fringes will be formed if white light is used in a Michelson''s interferometer

Vlsi, Working of bi- CMOS invertor in vlsi

Working of bi- CMOS invertor in vlsi

Latches and flip-flop circuits, Latches and flip-flop circuits: Latches...

Latches and flip-flop circuits: Latches and Flip-flop circuits are a combination of logic gates that perform basic memory functions for computers and peripherals. Both these c

Germanium, why germanium become intrinsic at high temperature

why germanium become intrinsic at high temperature

Credit limit, HOW WOULD YOU JUDGE THE POTENTIAL PROFIT OF BAJAJ ELECTRONICS...

HOW WOULD YOU JUDGE THE POTENTIAL PROFIT OF BAJAJ ELECTRONICS

Interest rate calculations, Interest Rate Calculations In considering ...

Interest Rate Calculations In considering the time value of money, it is convenient to represent mathematically the relationship between the current or present value of a sing

Electronics, how to make an amplifier circuit ?

how to make an amplifier circuit ?

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