I have a small problem regarding loops with a matlab simple script.
I have a structure/table with for example 13 fields. I want to name differently 3 of those fields for every 6 field. That's example:
- qwert
- qwert
- qwert
- something_else
- something_else
- qwert
- qwert
- qwert
- something_else
- something_else
- qwert
- qwert
- qwert ...
That's my code, but it doesn't work well.
v = (1:6:13);
for i = v:1:3
table(i).type = 'qwert';
end
I know that Matlab doesn't want to use this 'v' vector in for loop, instead it wants to have a scalar. How can I solve this?
Thank you very much in advance, Mary