binning data and evaluating
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
shobhit mehrotra
el 1 de Mzo. de 2015
Respondida: Greig
el 1 de Mzo. de 2015
I have a scatter plot of Y and X, I want to create a bin with the data between the point with the lowest y-value to the (lowest y-value +50) From the plot I want to bin the data from y=147 to y =197. Lastly I want the mean X and Y values for the bin.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147383/image.jpeg)
2 comentarios
per isakson
el 1 de Mzo. de 2015
Editada: per isakson
el 1 de Mzo. de 2015
Do you need to retrieve the data from an axes object or are the data available in variables?
Respuesta aceptada
Greig
el 1 de Mzo. de 2015
It this what you are looking for?
lim = [min(y), min(y) + 50]
ybin = y(y>= lim(1) & y<=lim(2))
xbin = x(y>= lim(1) & y<=lim(2))
ybar = mean(ybin);
xbar = mean(xbin);
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Scatter Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!