Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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'.

Risposta accettata

KSSV
KSSV il 28 Nov 2016
Modificato: KSSV il 28 Nov 2016
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) ;

Più risposte (0)

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by