请问以下这个axis equal 放在哪里?还是换个写法?

mesh(x,y,z1); hold on; mesh(x,y,z2);hold on;mesh(x,y,z3);hold on;mesh(x,y,z4)
这个 axis equal 放在哪里?还是换个写法? 我放在最后面 图是能够画出,但是要报错
??? Error using ==> set
Bad value for axes property: 'ZLim'
Values must be increasing and non-NaN.
Error in ==> axis>LocSetTight at 319
set(ax,'zlim',limits(5:6))
Error in ==> axis>LocSetImage at 395
LocSetTight(ax);
Error in ==> axis>LocSetEqual at 359
LocSetImage(ax,pbarlimit);
Error in ==> axis at 137
LocSetEqual(ax(j),pbarlimit);
Error in ==> plotRotate at 177
axis equal
应该怎么改


明月笑刀无情
浏览 343回答 2
2回答

红糖糍粑

解释:matlab函数图象很多时候为了把x和y的信息都表达得充分明显,会使x轴单位的实际长度和y轴单位的实际长度不一样。有利作用:比如说,y=0.00001*sin(x),系统就会自动拉长y轴来放大变化,方便我们看得清图象的函数变化。axis equal就是取消这种变化。把单位长度都变的一样。这样做的好处就是对于圆来说更像圆,弊端:但是对于一些变化很微小的函数就不是很直观,例如y=0.00000001* sin(x)看起来就有点像一条直线了

开满天机

TCH(X,Y,C) adds the "patch" or filled 2-D polygon defined byvectors X and Y to the current axes. If X and Y are matrices ofthe same size, one polygon ("face") per column is added. Cspecifies the color of the face(s) ("flat" coloring), or thevertices ("interpolated" coloring), for which bilinear interpolationis used to determine the interior color of the polygon.For both vector or matrix X and Y, if C is a string, each faceis filled with 'color'. 'color' can be 'r','g','b','c','m','y','w', or 'k'. If C is a scalar it specifies the color of theface(s) by indexing into the colormap. A 1x3 vector C is alwaysassumed to be an RGB triplet specifying a color directly.For vector X and Y, if C is a vector of the same length, itspecifies the color of each vertex as indices into thecolormap and bilinear interpolation is used to determine theinterior color of the polygon ("interpolated" shading).When X and Y are matrices, if C is a 1xn, where n is the numberof columns in X and Y, then each face j=1:n is flat colored by thecolormap index C(j). Note the special case of a 1x3 C is alwaysassumed to be an RGB triplet ColorSpec and specifies the sameflat color for each face. If C is a matrix the same size as Xand Y, then it specifies the colors at the vertices as colormapindices and bilinear interpolation is used to color the faces.If C is 1xnx3, where n is the number of columns of X and Y,then each face j is flat colored by the RGB triplet C(1,j,:).If C is mxnx3, where X and Y are mxn, then each vertex(X(i,j),Y(i,j)) is colored by the RGB triplet C(i,j,:) and theface is colored using interpolation.PATCH(X,Y,Z,C) creates a patch in 3-D coordinates. Z must be thesame size as X and Y.PATCH returns a handle to a Patch object. Patches are childrenof AXES objects.The X,Y,C triple (X,Y,Z,C quad for 3-D) can be followed byparameter/value pairs to specify additional properties of thePatch. The X,Y,C triple (X,Y,Z,C quad for 3-D) can be omittedentirely, and all properties specified using parameter/valuepairs.Patch objects also support data specified using the propertiesFaces, Vertices, and FaceVertexCData (see the reference manualfor more information). These properties do not have a conveniencesyntax, but may be specified using param-value pairs. Patchdata specified as XData, YData, ZData, and CData is translatedand stored internally as Faces, Vertices, and FaceVertexCData, andthe original matrices are not stored. When GET is used to queryXData, YData, ZData, or CData, the returned value is computed bytranslating from Faces, Vertices, and FaceVertexCData.GET(H), where H is a patch handle, displays a list of patchobject properties and their current values. SET(H) will displaya list of patch object properties and legal property values.你仔细看看 我觉得你写得不对 函数定义不完全
打开App,查看更多内容
随时随地看视频慕课网APP