# error

## Purpose

Display error messages.

## Synopsis

    error('text')

## Description

`error('text')` displays the text in the quoted string and causes an error message to return to the keyboard.

## Examples

`error` provides an error return from M-files.

    function foo(x,y)
    if nargin ~= 2
        error('Wrong number of input arguments')
    end

## See Also

    break, disp, return

(c) Copyright 1994 by The MathWorks, Inc.