Filter löschen
Filter löschen

Mean value of each cell of 2D grid

5 Ansichten (letzte 30 Tage)
darshan ravoori
darshan ravoori am 1 Mär. 2019
Kommentiert: Iris Kiebert am 16 Dez. 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?

Akzeptierte Antwort

Mark Sherstan
Mark Sherstan am 1 Mär. 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);

Weitere Antworten (0)

Kategorien

Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by