function [XX,YY]=rbf_inputs(x_cen,y_cen,varargin)
% The variable argument list, varargin, can be omitted, or be
% one of the following comma-separated lists:
%
% varargin=t;
% varargin=x_val,y_val;
% varargin=x_val,y_val,t .
% 
% If N=#(centers)=length(x_cen), and if M=#(evaluation pts)=
% =length(x_val), then the blocks comprising A have size=[M,N]. 
% Thus, size(A)=[2*M,2*N]. Of course, A=H(evaluation_pts-centers).
error(nargchk(2,5,nargin))
if size(x_cen)~=size(y_cen)
   error('The x_cen-array and y_cen-array are not the same size')
end
if nargin<=3,
   x_val=x_cen;
   y_val=y_cen; 
   if nargin==2,
      t=1; %default
   else
      t=varargin{1};
   end
else
   x_val=varargin{1}; y_val=varargin{2};
   if size(x_val)~=size(y_val),
      error('The x_val-array and y_val-array are not same size')
   end
   if nargin==4,
      t=1; %default
   else
      t=varargin{3};
   end
end
%Compute XX(k,j)=x_val(k)-x_cen(j)
[XV,XC_T]=meshgrid(x_val,x_cen);
XX=XV-XC_T;
%Compute YY(k,j)=y_val(k)-y_cen(j)
[YV,YC_T]=meshgrid(y_val,y_cen);
YY=YV-YC_T;



