Mesh Plotting in Matlab

조회 수: 1 (최근 30일)
Ali Baig
Ali Baig 2017년 11월 7일
답변: Precise Simulation 2017년 11월 8일
Hello, I am trying to perform a simple finite element analysis. To create a mesh, I am using
xArray = 0 : 0.1 : 1;
yArray = 1 : 0.2 : 2;
[X, Y] = meshgrid(x, y)
Now, I want to plot it like
What command is use for this purpose?

답변 (1개)

Precise Simulation
Precise Simulation 2017년 11월 8일
The following will plot quadrilaterals from your grid (if you prefer triangles you can use the patch command)
x = 0 : 0.1 : 1;
y = 1 : 0.2 : 2;
[X, Y] = meshgrid(x, y)
h = mesh(X,Y,ones(size(X)));
set(h,'marker','o','markeredgecolor','k','markerfacecolor','r', ...
'facecolor',[.9 .9 .9])
grid off
view(0,90)
axis equal

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by