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

1 回表示 (過去 30 日間)
felix
felix 2012 年 11 月 18 日
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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by