Constric dataset according to its items value

Dear Mathworks!
I have a dataset which contains only numbers in two coloums, named x_inf and y_inf. I have used the sortrow function to sort the rows, and I want to constrict the dataset by deleting those rows, where 'a'<=x_inf<='b', where 'a' and 'b' are constants.
How can I solve this?

답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 9월 9일

0 개 추천

x = randperm(100);
a = 30;
b = 70;
x2 = x(x>a&x<b)

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

질문:

2013년 9월 9일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by