How to grid xyz data without interpolation

조회 수: 10 (최근 30일)
Daniella Della-Giustina
Daniella Della-Giustina 2015년 5월 21일
댓글: Daniella Della-Giustina 2015년 5월 26일
I have a Digital Elevation Model (DEM) was provided as a list of x, y, z coordinates (x and y are 1 x N sized vectors). I would like to grid the so that I can view z as an N x N matrix, but I do NOT want to perform any interpolation on the surface described by z. It appears that the MATLAB 'griddata' function does not allow you to grid a dataset without interpolation. Is there any function that simply allows my to put this xyz data into a grid of z with dimensions along x and y?

답변 (2개)

Walter Roberson
Walter Roberson 2015년 5월 22일
If you are trying to create an N x N matrix out of a 1 x N vector then it will only be fractionally populated (1 out of N), and you have not defined what you want to go into the empty places.
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 5월 22일
If the purpose is just visual presentation then scatter() might be what you are looking for.
Daniella Della-Giustina
Daniella Della-Giustina 2015년 5월 26일
Yes, scatter may be quite helpful. I had a typo in my initial post. I have clarified above, only x and y are (1 x N) sized vectors, and z is an (N x N) sized vector.

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


John D'Errico
John D'Errico 2015년 5월 22일
If you only have a set of points that do not lie on a regular grid, BUT you require a gridded set of points, this is IMPOSSIBLE to solve without interpolation of some sort.
Wanting magic to happen will not suffice, unless of course, your name is Harry Potter. I don't recall any mathematics classes offered at Hogwarts.
  댓글 수: 1
Daniella Della-Giustina
Daniella Della-Giustina 2015년 5월 26일
Sorry--This was a typo on my part. I have clarified above, only x and y are (1 x N) sized vectors, and z is an (N x N) sized vector. The grid is rectangular, and I am hoping to find a tool that allows me to grid the data without an interpolation scheme choice being a mandatory input, as with 'griddata'.

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

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by