Calculations/MOT Simulator/+Helper/convertstruct2cell.m

6 lines
282 B
Mathematica
Raw Normal View History

function CellOut = convertstruct2cell(StructIn)
% CellOut = Convertstruct2cell(StructIn)
% converts a struct into a cell-matrix where the first column contains
% the fieldnames and the second the contents
CellOut = [fieldnames(StructIn) struct2cell(StructIn)]';
end