# slice

## Purpose

Volumetric slice plot.

## Synopsis

    h = slice(V,sx,sy,sz,nx)
    h = slice(X,Y,Z,V,sx,sy,sz,nx)

## Description

`h = slice(V,sx,sy,sz,nx)` draws slices of the volume matrix `V` for the locations specified in the index vectors `sx`, `sy`, and `sz` along the x, y, and z directions respectively. `nx` is the number of rows in `V`. `h` is a vector of handles to the created surface objects.

`h = slice(X,Y,Z,V,sx,sy,sz,nx)` draws the slices for the volume locations specified by the triples `(X(i),Y(i),Z(i))`.

## Examples

    [x,y,z] = meshgrid(-2:.2:2, -2:.2:2, -2:.2:2);
    v = x.*exp(-x.^2-y.^2-z.^2);
    slice(v,[5 15 21],21,[1 10],21)

(c) Copyright 1994 by The MathWorks, Inc.