function r = vpa(s,d)
%VPA    Variable precision arithmetic. 
%   R = VPA(S) numerically evaluates each element of the double matrix
%   S using variable precision floating point arithmetic with D decimal 
%   digit accuracy, where D is the current setting of DIGITS. 
%   The resulting R is a SYM.
% 
%   VPA(S,D) uses D digits, instead of the current setting of DIGITS.
%   D is an integer or the SYM representation of a number.
%
%   Examples:
%      vpa(pi,780) shows six consecutive 9's near digit 770 in the
%         decimal expansion of pi.
%
%      vpa(hilb(2),5) returns
%
%         [    1., .50000]
%         [.50000, .33333]
%
%   See also DOUBLE, DIGITS.

%   Copyright (c) 1993-1999 The Mathworks, Inc. All Rights Reserved.
%   $Revision: 1.9 $  $Date: 1999/01/05 13:58:09 $

if nargin < 2
   d = digits;
end;
r = vpa(sym(s),d);
