Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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 ]

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 25 de Abr. de 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}

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by