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

1 次查看(过去 30 天)
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.

采纳的回答

Matt J
Matt J 2012-11-18
Use the FIND function
  6 个评论
felix
felix 2012-11-18
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 2012-11-18
编辑:Matt J 2012-11-19
It is more efficient to do
max1=max(C(:));
Also, as a hint to the second part
C(C==max1)=-inf

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by