Probably the easiest thing (since it's only two fields), is to simply concatenate them along the first dimension using cat
result = cat(1, x.sym, x.prob);
Or you could just use []
and ;
result = [x.sym; x.prob]
If you want a more general solution, you could use struct2array
with some reshaping
result = reshape(struct2array(x), [], numel(x)).';
Note that all of this assumes that the data within sym
and prob
are actually the same datatype and therefore able to be placed within the same array, otherwise a cell array is the only way to hold both fields.
Also your code is yielding a 1 x 1 cell array because you're wrapping your data x.sym
inside of a 1 x 1
cell array.