function y=wordm(x,q)
%given a matrix x, this performs contractions to the point q on the rows.
s=size(x);
s=s(1);
y=[];
for n=1:1:s
    y=[y ; fi(x(n,:),q)];
end
    