Mean value of each cell of 2D grid

3 ビュー (過去 30 日間)
darshan ravoori
darshan ravoori 2019 年 3 月 1 日
コメント済み: Iris Kiebert 2019 年 12 月 16 日
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 件のコメント
Iris Kiebert
Iris Kiebert 2019 年 12 月 16 日
How did you make a 2dgrid with cells?

サインインしてコメントする。

採用された回答

Mark Sherstan
Mark Sherstan 2019 年 3 月 1 日
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);
  1 件のコメント
darshan ravoori
darshan ravoori 2019 年 3 月 1 日
Thank you Mark. It worked

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by