I have two column data, where first column contains "Number of Elements" and the second column contains "Stages" data. I want to assign the same number of data elements of "Stages" data to the new column ("Required") column based on the "Number of Elements" (first column) data.
Sample data:
% Random data
data = ceil(10*rand(15,1));
data(:,2) = round(3*rand(15,1));
data =
2 0
10 3
1 2
8 2
9 0
9 3
1 2
4 1
3 2
9 1
5 0
10 1
2 0
3 1
2 1
I'd like to create a cell array containing an array of No of Elements times the value in Stages. How can I create this cell array?

Wrap a
forloop aroundrepmatto populate your cell array