I have a struct A with many fields:
Now I want to create a struct B, with the same fields:
With
B has also the same size as A, and all values of A are also included. But I want to have an empty struct with 0x1 dimension.
Background: in a loop I want to sort out some entries of A, that fit a certain criteria and write it into B. If I do
then the structs do not match. Therefore I want to create B in advance and then assign it.
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/122057-how-to-create-an-empty-struc-with-fields-of-a-given-struct#comment_202787
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/122057-how-to-create-an-empty-struc-with-fields-of-a-given-struct#comment_202787
Sign in to comment.