MATLAB: How to separate a cell array based on existing strings

cell arraymarticesstring

I have a cell array that is 2452×5 but it has been reduced for the purpose of this question. I would like to separate the cell array, raw, into separate matrices based on a string within rows ('VR26'). The string isn't always present in the first column, the cell array below was simplified.
raw =
'VR26' [ 0.0539]
'VR26' [ 0.0015]
'VR26' [ 14.0853]
'VR27' [ 0.0658]
'VR27' [ 0.0022]
'VR27' [ 25.7290]
'VR40' [ 0.1425]
'VR40' [ 0.0566]
'VR40' [ 1.7189]
'VR40' [ 1.3351]
'VR40' [ 6.0185e-04]
'VR40' [ 0.0085]
'VR40' [ 8.6243]
Be split into…
VR26 =
'VR26' [ 0.0539]
'VR26' [ 0.0015]
'VR26' [ 14.0853]
raw2 =
'VR27' [ 0.0658]
'VR27' [ 0.0022]
'VR27' [ 25.7290]
'VR40' [ 0.1425]
'VR40' [ 0.0566]
'VR40' [ 1.7189]
'VR40' [ 1.3351]
'VR40' [6.0185e-04]
'VR40' [ 0.0085]
'VR40' [ 8.6243]

Best Answer

You can do this by using cellfun function, like:
% Sample cell array
C = [{'VR26';'VR26';'VR27';'VR40'},num2cell(rand(4,1))];
idx = cellfun(@(x) strcmp(x, 'VR26'), C(:,1));
% Extracted data (VR26)
C1 = C(idx,:);
% Others
C2 = C(~idx,:);