Lets have a struct defined like this:
s.a = [1, 11];
s.b = [2, 22];
How can I convert it to struct defined like this:
s(1).a = 1;
s(1).b = 2;
s(2).a = 11;
s(2).b = 22;
This need comes from textscan() function. I read large file using this function and then convert the result using cell2struct() function. In this case, however, each field contains whole column, so one has to address individual value by s.column_name(row_index). While I would prefer to do it by s(row_index).column_name.