Mesh Plotting in Matlab
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169261/image.jpeg)
What command is use for this purpose?
0 comentarios
Respuestas (1)
Precise Simulation
el 8 de Nov. de 2017
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
0 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!