Calculations/MOT-Simulator/+Helper/convertstruct2cell.m

6 lines
282 B
Mathematica
Raw Normal View History

2024-06-18 19:01:35 +02:00
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