How can i make a matlab function that ll take as entrance two matricies A and B

1 view (last 30 days)
How can i make a matlab function1 that ll take as entrance two matricies A and B and give us out1:the places where A and B have the same number,out2:the numbers that are same in A and B.

Accepted Answer

Matt J
Matt J on 18 Nov 2012
Use the FIND function
  6 Comments
felix
felix on 18 Nov 2012
how can i make a function that accepts as input a vector of integers, which will return the largest and the second largest component of the vector for the first i think that is max1=max(max(C)) any idea for max2?
Matt J
Matt J on 18 Nov 2012
Edited: Matt J on 19 Nov 2012
It is more efficient to do
max1=max(C(:));
Also, as a hint to the second part
C(C==max1)=-inf

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!