how to use for loop to process on all the points in a domain?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have 150 points on a picture I want to calculate Distance of x and y of each point from all points and then find the points that are both x and y distances from other points less than 20.I use below code for do this.the below code do this only for r = 150!!!why this happen?and How I can do this for all points in this domain?
for r =1:150
x = abs(round(f(1,r)-f(1,:)));
y = abs(round(f(2,r)- f(2,:)));
[xx,indxx] = find(x<=20 & y<=20)
end
3 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!