필터 지우기
필터 지우기

How to select the best matrix from a set of matrices and label it as 'TEC' ?

조회 수: 1 (최근 30일)
For example, we have 5 matrices A,B,C,D,E and I have to select the best matrix based on a certain parameter and I want to label it as 'TEC'.
from a certain code i get
ResultM(:,:,1) =
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ResultM(:,:,2) =
1 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ResultM(:,:,3) =
0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ResultM(:,:,4) =
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ResultM(:,:,5) =
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
ResultEB(:,:,1) =
59
ResultEB(:,:,2) =
64
ResultEB(:,:,3) =
59
ResultEB(:,:,4) =
59
ResultEB(:,:,5) =
62
and I want to select the matrix with max value of ResultEB and want to label it as 'TEC'.

채택된 답변

KSSV
KSSV 2016년 11월 28일
편집: KSSV 2016년 11월 28일
ResultEB(1,1,1) = 59 ;
ResultEB(1,1,2) = 64 ;
ResultEB(1,1,3) = 59 ;
ResultEB(1,1,4) = 59 ;
ResultEB(1,1,1) = 62 ;
[val,idx] = max(ResultEB) ;
TEC = ResultEB(:,:,idx) ;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by