this is my equation using matlab , i can't get it manually.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
dmat = reshape(sqrt(sum((xy(a,:)-xy(a',:)).^2,2)),N,N);
5 commentaires
Réponse acceptée
njj1
le 19 Avr 2018
Modifié(e) : njj1
le 19 Avr 2018
This looks like it's the distance from each (x,y) pair to every other (x,y) pair.
A_{i,j} = \sqrt{(x_i - x_j)^2}, where x = (x,y)
4 commentaires
njj1
le 19 Avr 2018
Yes, it is, but they do it in a clever, vectorized way, where they do not have any for loops to cycle through each i,j.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!