Averaging scattered data in a 2D grid mesh

1 次查看(过去 30 天)
Goodmorning,
I have a file with data as x-coordinate, y-coordinate, z value.
I would like to use a 2-d square grid2-d square grid with a mesh of choosen dimension (20x20) to find the average of the z values of points that fall in the same grid cell.
I computed a mesh (using meshgrid function) that covers all my points, but I can't figure out how to average the points inside each grid cells.
Are there any functions in matlab which can be used to do this?
I'm new with matlab, so sorry if this is a very simple question.
Thanks for your help!
  1 个评论
darova
darova 2019-10-29
Maybe you are looking for griddata. It can create surface (2D matrices) for your vectors

请先登录,再进行评论。

回答(1 个)

Sai Sri Pathuri
Sai Sri Pathuri 2019-11-6

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by