필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016년 4월 25일
댓글: Azzi Abdelmalek 2016년 4월 25일
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 ]

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 25일
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}

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by