% all points in the grainxx=grains(978).x;yy=grains(978).y;% and perimeter pointspx = grains(978).boundary.x;py = grains(978).boundary.y;
% then apply some critiria
dist_min=3;
h=1;for n=1:length(xx) %probably better ways than a for statement but easier to display my pointdist= min( ((xx(n)-px).^2 + (yy(n) - py).^2 ).^.5 );%distance between each point and perimeterif dist > dist_min[xuse(h) yuse(h)] = [xx(n) yy(n) ]; h=h+1;
pos_go(h)= n;
endend
--
If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
---
You received this message because you are subscribed to the Google Groups "MTEX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/mtexmail.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "MTEX" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mtexmail/Caz48tEI4e8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mtexmail+u...@googlegroups.com.