function b=idst(a,n)
%IDST	Inverse discrete sine transform.
%
%	X = IDST(Y) inverts the DST transform, returning the
%	original vector if Y was obtained using Y = DST(X).
%
%	X = IDST(Y,N) pads or truncates the vector Y to length N 
%	before transforming.
%
%	If Y is a matrix, the IDST operation is applied to
%	each column.
%
%	See also: FFT, IFFT, DST.

%       A. Nordmark 10-25-94.
%       Copyright (c) 1994 by The MathWorks, Inc.
%	$Revision: 1.5.1.1 $  $Date: 1995/08/14 15:04:45 $

if nargin==1
  if min(size(a))==1
    n=length(a);
  else
    n=size(a,1);
  end
end

nn=n+1;
b=2/nn*dst(a,n);
