📅  最后修改于: 2022-03-11 14:59:59.642000             🧑  作者: Mango
Age = [38; 43; 38; 40; 49];Height = [71;69;64;67;64];Weight = [176;163;131;133;119];Gender = {'F';'F';'M';'F';'M'};T = table(Age,Height,Weight,Gender);[G,gender] = findgroups(T.Gender);Tarray = table2array(T(:,1:end-1));out_mean = splitapply(@mean,Tarray,G);