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