You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: vtxpolyfit.m
    path of file: ./repos/gptoolbox/mesh
    
    the code of the file until where you have to start completion: function [polycoefs] = vtxpolyfit(V,mmesh,vtxset,vals,deg) 
% VTXPOLYFIT produces #V x m matrix of polynomial coefficients, m =
% (deg+1)*(deg+2)/2 the ordering of monomials is 1, u, v, u^2, uv v^2, u^3, u^2
% v ...  the fit is regularized, so that if there are not enough degrees of

    
function [polycoefs] = vtxpolyfit(V,mmesh,vtxset,vals,deg) 
% VTXPOLYFIT produces #V x m matrix of polynomial coefficients, m =
% (deg+1)*(deg+2)/2 the ordering of monomials is 1, u, v, u^2, uv v^2, u^3, u^2
% v ...  the fit is regularized, so that if there are not enough degrees of
% freedom a reasonable result should still be produced if 2 layers of vertices
% are fixed, there is enough dofs for deg 1 and typically not enough for deg 2
% if 3 layers are fixed then there is typically enough dofs for deg 2
%
% [polycoefs] = vtxpolyfit(V,mmesh,vtxset,vals,deg)
% 
% Inputs:
%   V  #V list of points
%   mmesh  data structure produced by hds
%   vtxset  a set of indices
%   vals  values at vertices
%   deg  polynomial total degree , primarily intend