Mean value of each cell of 2D grid

4 visualizaciones (últimos 30 días)
darshan ravoori
darshan ravoori el 1 de Mzo. de 2019
Comentada: Iris Kiebert el 16 de Dic. de 2019
Hi I am trying to solve a problem that has x,y data and f(x,y). It's a 2D temp map with f(x,y) being temperature values.
I have too many x (3000 values) and y (3000) values and f(x,y) (3000) values.
When I plot surface 2D it generates very odd map with too much of data. To avoid that I am looking to reduce the number of grid points by taking some avg. This way I can reduce the number of grid points.
Can any one has suggestions how to do matlab code for this?
  1 comentario
Iris Kiebert
Iris Kiebert el 16 de Dic. de 2019
How did you make a 2dgrid with cells?

Iniciar sesión para comentar.

Respuesta aceptada

Mark Sherstan
Mark Sherstan el 1 de Mzo. de 2019
Look at Jan's answer here. He provides MATLAB code and a refernce to the File Exchange. For your convienance:
X = rand(20, 30);
R = reshape(X, 2, 10, 2, 15);
S = sum(sum(R, 1), 3) * 0.25;
Y = reshape(S, 10, 15);

Más respuestas (0)

Categorías

Más información sobre Data Distribution Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by