function s = nodetovector(nodenumber, nodeperrow)
a = floor(nodenumber/nodeperrow);
b = nodenumber-a*nodeperrow;
if b>0
    s = [a+1;b];
else
    s = [a;nodeperrow];
end

end