3D plot over triangular grid

2 ビュー (過去 30 日間)
Diego Soler Polo
Diego Soler Polo 2018 年 6 月 6 日
回答済み: HAMZA NASSAR 2020 年 1 月 23 日
I want to make a 3D plot over a non-rectangular grid. I have vectors X=linspace(0,1,100) and Y=linspace(0,1,100) and I create the typical rectangular grid [x,y]=meshgrid(X,Y). Now I have matrix Z, and I can represent without problems mesh(x,y,Z). The thing is that I only know Z for points (x,y) with y less or equal than x, but never for (x,y) with y greater than x. Therefore, I would like to plot (x,y,Z) but showing only the triangular region of points (x,y) with x and y between 0 and 1 and y less or equal than x. How can I achieve this? Thanks!

回答 (1 件)

HAMZA NASSAR
HAMZA NASSAR 2020 年 1 月 23 日
use delaunay

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by