Hi, I have a set of values of random size generated at each iteration, a,
a = [0,0,0,1,2,3,0,0,4,5,6,0,0,7,8,9,10,0,0,0,0,0];
binaryMask = a>0;
label = bwlabel(binaryMask);
b1 = a(a==1); b2 = a(a==2); b3 = a(a==3);
I carry out some tasks on b1,b2 and b3. However the part I am struggling with is to reconstruct the whole data set back with these new values. I would like the 0's to be present in the final column of values such that,
c = [0,0,0,b1,0,0,b2,0,0,b3,0,0,0,0,0];
I feel like I am getting something wrong. Any help?
Many thanks.
Best Answer