Remove data from matrix

1 回表示 (過去 30 日間)
Anonymous User
Anonymous User 2020 年 4 月 6 日
編集済み: KALYAN ACHARJYA 2020 年 4 月 6 日
How i remove the data >30 and <25 ? and how i make a pattern to remove them in any futuer data ?
  4 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 4 月 6 日
編集済み: KALYAN ACHARJYA 2020 年 4 月 6 日
When you remove the element from the matrix, what remains in that location?
Anonymous User
Anonymous User 2020 年 4 月 6 日
100X15
x=randi([25 30]),100,15);
y=randi([20 50]),100,5);
w=[x y];
plot(w)

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

採用された回答

KSSV
KSSV 2020 年 4 月 6 日
If A is your array....
You can remove data using:
A(A>30) = [] ;
A(A<25) = [] ;
Or replace them with NaN's, if yu want same size.
A(A>30) = NaN ;
A(A<25) = NaN ;

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by