Group1 = [A;B];Summarize the categorical array, Group1summary(Group1)milk 20
water 18
juice 15Group1 is a 53-by-1 categorical array with three categories: milk, water, and juice.Create Categorical Array with Different CategoriesCreate a categorical array, Group2, containing data from 50 students who were given the
additional beverage option of soda.Group2 = gallery('integerdata',4,[50,1],2);
Group2 = categorical(Group2,1:4,{'juice' 'milk' 'soda' 'water'});Summarize the categorical array, Group2.summary(Group2)juice 18
milk 10
soda 13
water 9Group2 is a 50-by-1 categorical array with four categories: juice, milk, soda, and
water.Concatenate Arrays with Different CategoriesConcatenate the data from Group1 and Group2.students = [Group1;Group2];Summarize the resulting categorical array, students.summary(students)milk 30
water 27
juice 33
soda 138 Categorical Arrays