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

Trusses, determine forces in each member of equilqteral truss

determine forces in each member of equilqteral truss

Business Management Techniques -Company organisation, Business functions of...

Business functions of engineering firm 2.1-Engineering business: 2.2- Functions of engineering business

Analysis of the energy intensity, Analysis of the energy intensity and CO 2...

Analysis of the energy intensity and CO 2 emissions of a State a . From DOE/Energy Information Agency Florida profile is given by the following numbers (2009): What is

Air flow control system – operation, Air flow control system – operation: ...

Air flow control system – operation: The stages of the compressor are matched to give the highest efficiency in the speed range maximum rev/min. To extend the range of smooth

Risk Analysis, how would I find assistance with such toics as: probability ...

how would I find assistance with such toics as: probability assessment methods, risk modeling, stochatic dominance and multi-attribute methods?

Electronics, what are basic think to select the bjt as switch

what are basic think to select the bjt as switch

Payback period method, Non-discounted cash flow method, Payback period met...

Non-discounted cash flow method, Payback period method In this method, time value of money is not considered. It takes into account the number of years required to recover the in

Communication, Can u provide some information about simple wireless transmi...

Can u provide some information about simple wireless transmitter and receiver.

Calculate the maximum amount of recoverable resource, A 30m deep quarry pit...

A 30m deep quarry pit is to be constructed in a jointed basalt rock mass. The quarry management wants to maximise the side wall inclination to 70° for economic reasons. The geologi

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