Users that often use cat(1,s.field) find annoying that this function generates error if the field is in different orientation (row or column vector). Instead of try ... catch, it's suggested to use transpose_structure(s).
>> s = struct('x',ones(10,1),'y',zeros(5,1));
>> s = transpose_structure(s)
replaced length() by numel()
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.