function a = compVel(X,value)
% a = compVel(X,value)
% Takes values defined for velocities and transforms it in a matrix
% with values for each node. Accepts constant values in vector form
% (2x1 vector) or MATLAB expression in a 2x1 vector (for each coordinate).

x = X(:,1);
y = X(:,2);

a   = zeros(length(x),2);
uns = ones(length(y),1); 

if isnumeric(value(1))
    a(:,1) = value(1)*uns;
else
    if isempty(strfind(s1,'x')) && isempty(strfind(s1,'y'))
        a(:,1) = str2double(s1)*uns;
    else
        a(:,1) = eval(s1);
    end
end

if isnumeric(value(2))
    a(:,2) = value(2)*uns;
else
    if isempty(strfind(s2,'x')) && isempty(strfind(s2,'y'))
        a(:,2) = str2double(s2)*uns;
    else
        a(:,2) = eval(s2);
    end
end
