Elimination of rows in array

4 ビュー (過去 30 日間)
Vadim Tambovtsev
Vadim Tambovtsev 2016 年 10 月 7 日
コメント済み: Vadim Tambovtsev 2016 年 10 月 7 日
Hello. Didn't find a relevant answer.
Suppose we have an array of such form:
A=[a1 b1 c1 d1; a2 b2 c2 d2; etc], i.e. rows of sets of parameters. How to delete from the array the rows with the following conditions:
if 1)a1+b1<c1 then delete that row
and 2) if a1+b1>d1 then delete that row
end
Thank you!

採用された回答

Thorsten
Thorsten 2016 年 10 月 7 日
A(A(:,1)+A(:,2) < A(:,3) | A(:,1)+A(:,2) > A(:,4), :) = [];
  1 件のコメント
Vadim Tambovtsev
Vadim Tambovtsev 2016 年 10 月 7 日
Finally, they got deleted, thank you

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

その他の回答 (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