MATLAB: Is there ambiguity in splitapply

functionsMATLABsplitapply

Matlab's example below usses splitapply on a function which has two input arguments (h,w) but is called in splitapply with a signle input table (DT). How does Matlab chose which variable in the DT table is h and which is w?
https://www.mathworks.com/help/matlab/ref/splitapply.html
load patients
DT = table(Height,Weight);
GT = table(Gender,Smoker);
Define a function that calculates mean BMI from the weights and heights of groups or patients.
meanBMIFcn = @(h,w)mean((w ./ (h.^2)) * 703);
Create a table that contains the mean BMI for each group.
[G,results] = findgroups(GT);
meanBMI = splitapply(meanBMIFcn,DT,G);

Best Answer

"Y = splitapply(func,T,G) splits variables of table T into groups and applies func. The splitapply function treats the variables of T as vectors, matrices, or cell arrays, depending on the data types of the table variables. If T has N variables, then func must accept N input arguments."
The order is almost certainly the same as T.Properties.VariableNames