Classify rows of a matrix
이전 댓글 표시
Hello
I want to know how it is possible to define a condition as if the numbers at the second column of some rows of a matrix are equal to each other and at the same time if the numbers at the third column of the same rows are equal to each other , then classify the first column numbers of those rows and calculate their mean values...in simple words, consider matrix A as:
A=[0.9 20.1 0.3;
0.8 19 1;
0.57 20.1 0.3;
0.7 20.1 0.4;
1 19 1]
I need a code to calculate the mean value of 0.9 and 0.57 as the numbers in second and third column of row 1 and 3 are the same. It should also calculate the mean of 0.8 and 1 as the numbers in second and third column of row 2 and 5 are the same.
Any help is highly appriciated.
Bests
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Preprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!