www.gusucode.com > symbolic 源码程序 matlab案例代码 > symbolic/ControlResolutionOfContourLinesExample.m
%% Control Resolution of Contour Lines % Control the resolution of contour lines by using the |'MeshDensity'| % option. Increasing |'MeshDensity'| can make smoother, more accurate plots while % decreasing it can increase plotting speed. % % Divide a figure into two using |subplot|. In the first subplot, plot the contours % of $\sin(x)\sin(y)$. The corners of the squares do not meet. To fix this issue, increase % |'MeshDensity'| to |200| in the second subplot. The corners now meet, % showing that by increasing |'MeshDensity'| you increase the plot's resolution. syms x y subplot(2,1,1) fcontour(sin(x).*sin(y)) title('Default MeshDensity = 71') subplot(2,1,2) fcontour(sin(x).*sin(y),'MeshDensity',200) title('Increased MeshDensity = 200')