I have a pair of observations I just want to choose the pairs that . Is there any simpler way than writing a loop?

 Accepted Answer

Let A be your 100*2 data. With first column as x and second column as y.
idx = A(:,1)>0 ; % get logical indices of x which are > 0
iwant = A(idx,:) ;

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Release

R2020a

Tags

Asked:

on 1 Jun 2020

Answered:

on 1 Jun 2020

Community Treasure Hunt

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

Start Hunting!