How to smooth the slope of the Surface plot in Y direction?

2 ビュー (過去 30 日間)
Garvit Amipara
Garvit Amipara 2021 年 5 月 6 日
編集済み: Garvit Amipara 2021 年 5 月 6 日
While using the surf command to plot x,y and z data of 3 curves C1,C2 and C3 as shown in attachment file(see in image.jpg (a)) the surface generated is very smooth in x-direction (image(b)) but in y-direction the surface (looks like stairs) is not smooth(image(c)).
%The XYZ, xq, yq and vq data are in attachments.
mesh = 100;
x_lim = [0 0.2];
y_lim = [1 3];
x_mesh = (x_lim(1,1)+x_lim(1,2))/mesh;
y_mesh = (y_lim(1,1)+y_lim(1,2))/mesh;
x= XYZ(:,1); y= XYZ(:,2); z=XYZ(:,3)';
[xq, yq] = meshgrid(x_lim(1,1):x_mesh:x_lim(1,2), y_lim(1,1):y_mesh:y_lim(1,2));
vq = griddata(x,y,z,xq,yq,'natural');
xlim([x_lim(1,1) x_lim(1,2)]);
ylim([y_lim(1,1) y_lim(1,2)]);
h = surf(xq, yq, vq,'FaceAlpha', 0.9);
zlim([50 100]);
Can someone please help to understand the problem and to get a smooth curved surface in y-direction as well? Any suggestion will be a big help!!

回答 (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