function pos = posrecur(Mpos, vars)

if length(vars) == 1
    pos = Mpos{vars(1)}{1};
else
    pos = posrecur(Mpos{vars(1)}{2},vars(2:end));
end;    