Writestruct() 'Scalar' Error
49 views (last 30 days)
I am attempting to use writestruct() to save a structure to a .csv file, using version 2020b.
I started by calling writestruct as follows: writestruct(S,fullname), where S is the structure, and fullname is fullname=[path filename], which was obtained via uiputfile.
When I run this, I receive this error: Expected S to be a scalar.
I figured that the structure S could be anything as long as it is a structure, what am I missing?
Walter Roberson on 10 Feb 2021
No, you must use a scalar structure, not a non-scalar structure.
S(1).this = 'that';
S(2).this = 'the other';