surfir - Surface plot from irregular data points

版本 1.0.0 (120.2 KB) 作者: Hauke Gravenkamp
surfir takes vectors of data points x,y,z and creates a surface plot - similar to surf but for irregularly spaced data.
875.0 次下载
更新时间 2020/3/16

查看许可证

This is a very common problem among Matlab users: You have some values of a function, say z=z(x,y) at some arbitrarily distributed points (x,y). The points are not evenly spaced and the domain may even be non-convex. You want to visualize the function as one of those nice surface plots.
'surf', however, requires the data to come in the form of a mesh grid, which is not easy to obtain if you don't have an explicit form of the function z(x,y). You can use a simple scatter plot of the data points, but that doesn't usually look nice. You can also triangulate between the data points, but many users struggle with using this approach, especially the constrained triangulation required for non-convex domains.

This function 'surfir' is intended as a straightforward-to-use solution for surface plots from irregular data. Inputs are vectors x,y,z containing the data points. surfir uses the Matlab function 'boundary' to determine the boundary of the domain. It then performs a constrained Delaunay triangulation inside the domain and plots the triangulated surface with the values of z interpolated between the data points.

The folder contains the function surfir as well as two examples of a convex and a concave domain.

引用格式

Hauke Gravenkamp (2024). surfir - Surface plot from irregular data points (https://www.mathworks.com/matlabcentral/fileexchange/74544-surfir-surface-plot-from-irregular-data-points), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2019b
与 R2014b 及更高版本兼容
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0