フィルターのクリア

How do I plot an empty circle with no values in the middle of meshgrid plot3

3 ビュー (過去 30 日間)
Chua Wei Yi
Chua Wei Yi 2022 年 10 月 11 日
Hi everyone.
Bascially I am tracking the depth of a surface using grids. x,y coordinates and z for depth. To fill the voids in between grids, I am using meshgrid with natural interpolation. However I have placed a circular piece in the middle of the grid hence on a plot3 it is supposed to be a white circular figue. How do I make sure this is drawn correctly because the image I attached does not look correct. Also how do I make sure that the meshgrid interpolates around the shape of the circle in the middle? This the code I have currently.
x = data(:,1); y = data(:,2); z = data(:,3)
x = table2array(x); y = table2array(y); z = table2array(z)
xlin = linspace(min(x), max(x), 100);
ylin = linspace(min(y), max(y), 100);
[X,Y] = meshgrid(xlin, ylin);
Z = griddata(x,y,z,X,Y,'natural');
% Z = griddata(x,y,z,X,Y,'cubic');
% Z = griddata(x,y,z,X,Y,'v4');
mesh(X,Y,Z)
axis tight; hold on
plot3(x,y,z,'.','MarkerSize',15)

回答 (0 件)

カテゴリ

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