Averaging scattered data in a 2D grid mesh

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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

질문:

2019년 10월 29일

답변:

2019년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by