How to find minimal distance during locomotion
    2 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hello,
I would like to find the distance between two points. I have a dataset with 4 columns , the first and second column are the x,y coordinates for the participants locomotion, the third and fourth columns are the X,Y coordinates for the targets (total targets =9, ). I would like to know if the participant reached a target or several targets during de locomotion using the distance. I wrote this function :
function d= distini(x,X,y,Y)
    for i=1:length(x)
        for ii=1:9
           t= sqrt(((X(ii) - x(i)).^2) + ((Y(ii)- y(i)).^2));
           d=t'
        end
    end 
end 
thanks in advance
0 commentaires
Réponses (0)
Voir également
Catégories
				En savoir plus sur Loops and Conditional Statements 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!
