decompilation a struct to a string which creats it
If you have check the type of a field by "if ~isstruct()" you do not have to check by "elseif isstruct()" afterwards, but a simple "else" is enough.
It would be useful to specify the accepted sizes and types of the inputs: The function runs on scalar structs only. The fields can be strings, scalar doubles or empty. But what about cell strings, CHAR matrices, singles or integers? This should be explained in the documentation and caught by an exception handling.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.