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!