Loop or no Loop?
Afficher commentaires plus anciens
Hello,greetings from Greece.I have a large data set with columns(longitude,latitude,u,v,w,etc).Because longitude and latitude are discontinuous in some points,i have to separate the data set in 81 parts (not equal in length) to take a different figure of each part(where longitude and latitude are continuous). I have done this manually but i was wandering if there was a way to do this in a loop(to be more beautiful),because the code i use every time is the same. The only thing that change is as an example: for the first figure i=1:1:517 , for the second figure i=518:1:721 ,for the third i=722:1:1200 ... where i is the line of the dataset and its size is not presized(the other code is the same).If someone can help, i would be gratefull.
Réponse acceptée
Plus de réponses (1)
Pantelis Saviolakis
le 24 Fév 2014
0 votes
2 commentaires
Iain
le 24 Fév 2014
You will need to adapt what I gave you for what you need:
find(dlat > 1); might need to be:
find(dlat > 0.0001);
dlat = abs(diff(latitude)); might need to be:
d_dist = sqrt(diff(latitude).^2 + diff(longitude).^2);
Pantelis Saviolakis
le 24 Fév 2014
Catégories
En savoir plus sur Ground Truth Labeling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!