slice通过体积数据显示正交的切片平面。
句法
slice(V, sx, sy, sz)slice(X, Y, Z, V, sx, sy, sz)slice(V, XI, YI, ZI)slice(X, Y, Z, V, XI, YI, ZI)slice(..., 'method')slice(axes_handle, ...)h = slice(...)
例子
体积函数切片
f(x, y, z)=cos^2 x+cos^2 y-z^2|x|≤3, |y|≤3, |z|≤3 at x=-2and 2, y=2, and z=-2.5 and 0.v=[-3: .2: 3];
[x, y, z]=meshgrid (v, v, v);
f= (cos(x).^2+sin(y). ^2-z. ^2);
xv= [-2 2. 5];
yv=2;
zv = [-2.5 0];
slice (x, y, z, f, xv, yv, zv);
【MATLAB 3D函数slice()】输出
文章图片
推荐阅读
- MATLAB 3D函数surfc()
- MATLAB 3D函数cylinder()
- MATLAB 3D函数Ribbon()
- MATLAB 3D函数sphere()
- MATLAB 3D函数ellipsoid()
- MATLAB 3D函数stem3()
- MATLAB 3D函数mesh()
- MATLAB 3D函数Waterfall()
- MATLAB 3D函数meshz()