Here is the error:
Error using matlab.internal.tabular.private.tabularDimension/assignLabels (line 365) The VariableNames property must contain one name for each variable in the table.
Error in matlab.internal.tabular.private.varNamesDim/validateAndAssignLabels (line 404) obj = obj.assignLabels(newLabels,fullAssignment,varIndices);
Error in matlab.internal.tabular.private.tabularDimension/setLabels (line 173) obj = obj.validateAndAssignLabels(newLabels,indices,fullAssignment,fixDups,fixEmpties,fixIllegal);
Error in matlab.internal.tabular.private.tabularDimension/createLike_impl (line 355) obj = obj.setLabels(dimLabels,[]);
Error in matlab.internal.tabular.private.varNamesDim/createLike (line 76) obj = obj.createLike_impl(dimLength,dimLabels);
Error in tabular/initInternals (line 212) t.varDim = t.varDim.createLike(nvars,varnames); % error if invalid, duplicate, or empty
Error in table (line 259) t = t.initInternals(vars, numRows, rownames, numVars, varnames);
Error in Analysis_of_weightgainpercentage (line 18) t = table(CHSD,meas(:,1),meas(:,2),meas(:,3),meas(:,4),meas(:,5),meas(:,6),meas(:,7),meas(:,8),meas(:,9),meas(:,10),meas(:,11),meas(:,12),meas(:,13),meas(:,14),meas(:,15),meas(:,16),meas(:,16),meas(:,17),meas(:,18),'VariableNames',{'CHSD','meas1','meas2','meas3','meas4','meas5','meas6','meas7','meas8','meas9','meas10','meas11','meas12','meas13','meas14','meas15','meas16','meas17','meas18'}); Trial>>