필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

work with two filtering criteria

조회 수: 1 (최근 30일)
Thishan Dharshana Karandana Gamalathge
마감: MATLAB Answer Bot 2021년 8월 20일
A=[2 5 NaN 10 NaN 1 NaN 20 1 10];
B=[Nan 3 5 50 NaN 1 89 11 5 9];
1st I had to get rid of pairs which had NaN in either A or B. So I got A1 and B1 to be A1=[5 10 20 1 10]; B1=[3 50 11 5 9]; Then I removed data from B which are greater than 10. So I left with B2=[3 5 9]. My question is how to get corresponding values from A1. ie. how to get A1=[5 1 10]?

답변 (1개)

Walter Roberson
Walter Roberson 2017년 6월 18일
mask = B1 <= 10
A1(mask), B1(mask)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by