I want to put together 2 cells of different sizes in the same struct
. For example:
a = {'one', 'two', 'three'};
b = {'four', 'five', 'six', 'seven'};
struct("setA", a, "setB", b);
Whenever I try to do this, MATLAB throws the following error:
error: struct: dimensions of parameter 2 do not match those of parameter 4
According to the error message the problem is the dimensions of the cells. Furthermore, if I remove one element from cell b
the process finishes without errors:
a = {'one', 'two', 'three'};
b = {'four', 'five', 'six'};
struct("setA", a, "setB", b);
Any suggestions?