Azzera filtri
Azzera filtri

if i have three matrix i want to return some one according to vaue

2 visualizzazioni (ultimi 30 giorni)
if i have
S1 = [ 1 0 0 1
1 1 1 0
0 1 0 1 ]
S2 = [ 1 1 0 1
0 1 0 1
1 1 0 0]
S3 = [ 1 1 1 1
0 0 1 1
1 0 1 0]
AND suppose that these matrix have these value
5 4 7
where 5 for the S1 , 4 FOR S2 , 7 FOR S3
according to these value i want to return the second min value where its the 5
then the result will be
s1 = [ 1 0 0 1
1 1 1 0
0 1 0 1 ]

Risposte (1)

Azzi Abdelmalek
Azzi Abdelmalek il 25 Apr 2016
S1 = [ 1 0 0 1
1 1 1 0
0 1 0 1 ]
S2 = [ 1 1 0 1
0 1 0 1
1 1 0 0]
S3 = [ 1 1 1 1
0 0 1 1
1 0 1 0]
v={S1,S2,S3}
idx=[5 4 7]
[~,ii]=min(idx)
out=v{ii}

Categorie

Scopri di più su Operators and Elementary Operations 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