フィルターのクリア

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

1 回表示 (過去 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}
  2 件のコメント
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 4 月 25 日
i need the second min value which equal for 5 which is the S1
Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 25 日
[~,ii]=sort(idx),
out=v{ii}

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by