q matrices element matching
이전 댓글 표시
i have a matrix like
A=[1 2 3 4 5;
1 2 3 4 6
1 3 4 5 8];
i want a output like X=[1 2 3 4 0]
i.e. i need the common element in the particular coloumn if there is no particular coloum result must b zero
채택된 답변
추가 답변 (1개)
Steven Lord
2019년 8월 28일
0 개 추천
I suspect this is a homework assignment so I'm only going to give a hint. You want the most common element as long as it appears multiple times? The mode function may be of use to you.
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!