remove obsevations with x=0

1 次查看(过去 30 天)
I have a pair of observations I just want to choose the pairs that . Is there any simpler way than writing a loop?

采纳的回答

KSSV
KSSV 2020-6-1
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,:) ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by