# saxis

## Purpose

Sound axis scaling.

## Synopsis

    saxis([smin smax])
    saxis('auto')
    v = saxis

## Description

The `sound` function ordinarily scales its input vector `y` so that the maximum and minimum values in `y` correspond to the maximum and minimum input ranges allowed by the sound hardware. Usually this is in the range ±1.0. `saxis` is analogous to `caxis` and `axis`, only its scaling applies to sound limits rather than graphical limits.

`saxis([smin smax])` disables `sound`'s automatic scaling and sets the scaling so that `smin` and `smax` correspond to the minimum and maximum input ranges allowed by the sound hardware.

`saxis('auto')` sets sound axis scaling back to automatic.

`v = saxis` returns the two-element row vector `v` containing the `[smin smax]` currently in effect.

## Examples

Set the sound limits to ±1.0 and play a 1000 Hz tone using an 8192 Hz sample rate:

    saxis([-1 1])
    t = (0:10000)/8192;
    y = sin(2*pi*1000*t);
    sound(y,8192)
    saxis([-2  2])       %increase the volume
    saxis([-.5  .5])     %decrease the volume

## See Also

    axis, caxis, sound

(c) Copyright 1994 by The MathWorks, Inc.