You may have already noticed this, but the error is due to having fields with an unequal number of rows. When you pass a scalar structure as input to struct2table(), it expects every row to be a different row in the table. This is problematic if the number of rows for each field varies.
In your provided data, it looks like there are three fields causing this problem: ELEVB, ELEVB_FR, and SNOEB.
One simple workaround is to encapsulate those fields into 1x1 cell arrays.
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/277584-possible-bug-in-struct2table#comment_356633
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/277584-possible-bug-in-struct2table#comment_356633
Sign in to comment.