How do I extract data between a range in an XY array
이전 댓글 표시
I've been using MATLAB for a while but can't seem to find an efficient way of selecting XY data between a range.
I have a large physical data set imported which is an array of XY data points, I've tried to fake a section below:
dummyXYArray = [transpose([0:1:10]) rand(11,1)];
How do I return a similarly formed array with only data between 2<x_desired<7
My slow way requires tons of steps:
xDataDummyXYArray = dummyXYArray(:,1);
yDataDummyXYArray = dummyXYArray(:,2);
clippingArray = xDataDummyXYArray>2 & xDataDummyXYArray<7;
clippedArray = [xDataDummyXYArray(clippingArray) yDataDummyXYArray(clippingArray)]
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!