Hi everyone,
May some one help me here …
I have data in three colums. (1) x-coordinate; (2) y-coordinate; and (3) z-value (parametere) of data length (55000 data points: I reduce the file size due to limit of 5 MB) I required to extarct the z-values lying inside the polygon.
My scripit did not work for the above mentioned purpose. May someone help me how to handle this data and simple script attched here.
clear allclc data=xlsread('Mc_catalog.xlsx'); for i=1:length(data) x = data(:,1) ; y = data(:,2) ; z = data(:,3 ) ;xVertices = [-116.8, -116.7, -116.45, -116.7];yVertices = [33.55, 33.40, 33.70, 33.85];idx(i) = inpolygon(x(i), y(i), xVertices, yVertices);iwant(i) = [ z(idx )] ; end
Thank you.
Best Answer