function y = mapcol(text,p0,p1,p2)
%MAPCOL                                                  [jMc 2/89]
%    mapcol(STRING,A,B,C)  will execute the command
%       contained in STRING over the columns of the matrix A,
%       creating one column of the output matrix at a time.
%       The additional arguments B and C are available to pass parameters.
%    EX:  mapcol('x.*p1',A,b) will do a point-wise
%          multiplication of each column of A by the vector b.
%  see also MAPROW

[M,N] = size(p0);
y = [];
for i=1:N
   x = p0(:,i);
   y(:,i) = eval(text);
end
