Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xi = linspace(min(s.X),max(s.X),res);
- yi = linspace(min(s.Y),max(s.Y),res);
- [~,~, iBins] = histcounts(s.X,xi);
- [~,~, jBins] = histcounts(s.Y,yi);
- n_pts = length(s.X);
- in1 = zCs > 0.0030 & zCs < 0.1500;
- Ind = find(in1(:));
- [nrows ncols] = size(in1);
- I = rem(Ind-1,nrows)+1;
- J = (Ind-I)/nrows + 1;
- %
- %
- % [I,J] = ind2sub(size(in1), Ind);
- N_true = length(I);
- hwb = waitbar(0,'Please wait...');
- in = false(n_pts,1);
- for k = 1:N_true
- in3 = iBins == J(k) & jBins == I(k);
- in = in | in3;
- waitbar(k / N_true);
- end
- close(hwb);
- sum(in);
- xk = s.X(in);
- yk = s.Y(in);
- zk = s.Z(in);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement