I understand that you are trying to compute the percentiles on the values grouped using a column. The general syntax of 'grpstats' looks like the following:
statarray = grpstats(tbl,groupvar,whichstats,Name,Value)
where whichstats is the summary statistics to compute, specified as a string or function handle, or a cell array of strings and function handles.
To compute the percentile using grpstats, you need to provide a handle to the 'prctile' function. For example:
x = rand(10,1);
l = logical([zeros(5,1); ones(5,1)]);
stats = grpstats(x, l, @(y) prctile(y, [5 25 50 75 95]'));
This seems to work for me. I hope this solves your issue as well.