Hi Dennis,
Accumarray doesn't work in your case.
B = accumarray(ind,data)
It takes two arguments, indices and data. Based on the indices, it will accumulate the elements in data. And data doesn’t support cell array as input. But you mentioned your data is in cell array. Refer accumarray docs for more info.
Here is one possible solution to group rows of same sample code if you have data in cell array.
A = {'150c',15,20;'150c',16,21;'151a',10,11;'151a',11,12};
% The following statements gets us the number of unique labels in sample
% code column
B = cell2mat(A(:,1));
C = unique(string(B));
%Converting cell array to table that makes us easy to group rows with same sample code
table = cell2table(A);
% loop over all unique sample codes
for i = 1:length(C)
a = table.A1 == C(i);
%out contains the rows with one sample code
out = table(a,:);
%you can use plot statements here
end