MATLAB: Group data for location

table

Hello,
I have sales data column for 3 indepedent stores, A, B and C, in 3 seperate tables
I want to merge table A and B and test if there is difference between this group and store C
So, store A + B against C
tableA
tableB
tableC
% Concatenate columns vertically
x = [A;B;C];
% the tables do not have equal rows,
% therefore must concatenate them into a single column and use a grouping variable
% How should I change next line to make group A+B and single group C
group = [1 + zeros(size(A)); 2 + zeros(size(B)); 3 + zeros(size(C))];
% How should I change next line to make group A+B and single group C?
Thank you

Best Answer

group = [ones(size(A,1) + size(B,1),1); 2*ones(size(C,1),1)];