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