hi i have the following situation
h = [0,1,1,1;
0,0,0,0;
1,1,1,1];
i'll check incoming values which can range between 0 and rowsize of h, i.e. in this case 2,. so my options are 0,1,2.
now i want to create a single dimensional array (let's name it j) as follows
whenever the incoming value is 0
j = [0,1,1,1]
next time if the incoming value is 1
then j = [0,1,1,1,0,0,0,0]
and so on... how is it possible to achieve this in matlab? thanks!