フィルターのクリア

How to find rest of the number in matrix ?

3 ビュー (過去 30 日間)
M M Nabi
M M Nabi 2021 年 9 月 22 日
回答済み: Viranch Patel 2021 年 9 月 22 日
a = 1:10;
I = find(a>5)
aa = a(I)
bb = %%% How do I find the rest of the numbers??

採用された回答

Chunru
Chunru 2021 年 9 月 22 日
a = 1:10;
I = find(a>5)
I = 1×5
6 7 8 9 10
aa = a(I)
aa = 1×5
6 7 8 9 10
bb = a; bb(I)=[];
bb
bb = 1×5
1 2 3 4 5
  1 件のコメント
M M Nabi
M M Nabi 2021 年 9 月 22 日
Thanks

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

その他の回答 (1 件)

Viranch Patel
Viranch Patel 2021 年 9 月 22 日
a = 1:10;
I = find(a>5);
aa = a(I);
bb = a;
bb(I)=[];
You can reassign the value of bb as 'a' and then can have other values by specifying bb(I) = [].

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by