3 The key buffer is cleared.

4 If any or all of the display is “frozen” (by FREEZE), that state is cancelled.

5 If Last Arguments is enabled, the arguments to the command that caused the error are returned to the stack.

6 Program execution jumps to the error clause.

The commands in the error clause are executed only if an error is generated during execution of the trap clause.

IFERR … THEN … ELSE … END executes one sequence of commands if an error occurs or another sequence of commands if an error does not occur. The syntax of IFERR … THEN … ELSE … END is:

IFERR trap-clause THEN error-clause ELSE normal-clause END

If an error occurs during execution of the trap clause, the same six events listed above occur. If no error occurs, execution jumps to the normal clause at the completion of the trap clause.

Access: !°LLERROR [IFERR] IFERR ( °is the left-shift of the Nkey).

Flags: Last Arguments (–55)

Input/Output: None

Example: The following program uses IFERR much like the built-in linear system of equations solver. The program takes a result vector and a matrix of coefficients and returns a least-squares solution to the equations.

«→ a b « IFERR a b / THEN LSQ END » »

See also: CASE, ELSE, END, IF, THEN

IFFT

Type: Command

Description: Inverse Discrete Fourier Transform Command: Computes the one- or two-dimensional inverse discrete Fourier transform of an array.

If the argument is an N-vector or an N × 1 or 1 × N matrix, IFFT computes the one-dimensional inverse transform. If the argument is an M × N matrix, IFFT computes the two-dimensional inverse transform. M and N must be integral powers of 2.

The one-dimensional inverse discrete Fourier transform of an N-vector Y is the N-vector X where:

 

 

 

 – 1

 

 

 

ikn

 

 

 

1

 

 

 

--------------

 

X

 

Y

 

e



, i = –1

n

= ---

k

 

 



k = 0

 

 

 

 

 

 

 

 

 

 

 

 

for n = 0, 1, …, N – 1.

The two-dimensional inverse discrete Fourier transform of an M × N matrix Y is the M × N matrix X where:

 

 

 

 

M – 1 – 1

 

ikm

i ln

 

 

 

 

--------1

 

e----------------M

-----------------

X

mn

=

∑ ∑ Y

kl

e



, i = –1

 

 

M

k = 0 l = 0

 

 

 

 

 

 

 

 

 

 

 

 

 

for m = 0, 1, …, M – 1 and n = 0, 1, …, N – 1.

The discrete Fourier transform and its inverse are defined for any positive sequence length. However, the calculation can be performed very rapidly when the sequence length is a power of two, and the resulting algorithms are called the fast Fourier transform (FFT) and inverse fast Fourier transform (IFFT).

The IFFT command uses truncated 15-digit arithmetic and intermediate storage, then rounds the result to 12-digit precision.

Full Command and Function Reference 3-113