how to use for loop to process on all the points in a domain?

1 visualización (últimos 30 días)
soloist
soloist el 6 de Mzo. de 2019
Comentada: KSSV el 6 de Mzo. de 2019
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
soloist
soloist el 6 de Mzo. de 2019
I mean the domain is from 1 to 150.
KSSV
KSSV el 6 de Mzo. de 2019
why dont you show a plot......I meant to ask you have a curve or a plane?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by