This is my original plot. A,B,C are table columns of same lenght (500k rows, containing latitude, longitude and value correspondent). I need to draw a scatter of 500k/4 x 500k/4 instead of 500k x 500k, every four near points on the original scatter must became a single point and his value (on C) must be the mean value of the four points. How can i do that?
"every four near points on the original scatter" is not clear.
How would you group the 14 points below into groups of 4?
Or perhaps you want to create a small grid and average the values within the grid? Something that may look like this (completely different data, obviously)
Basically I wanto to downsample: take my 500k rows (representing 500k latitude and 500k longitude) and make a new plot. The solution of small grid seems optimal, but i can't implement the code because i'm not very expert at this.
The optimum will be building a grid of bins, inside every bin I have 0/1/2/3/4 points (i have not data for all points of the grid) and the value on every bin is the average value of these points
OK, I guess I did not understand your original question, then.
When you say 4 points "near" each other in your question, do you mean the vector indices are near each other (e.g. the 1st, 2nd, 3rd, 4th values in the vector), or do you mean that when you have plotted them, they are physically near each other (i.e. "nearest neighbors")?
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Translated by
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.