I have three arrays as shown in the code below
z = zeros(25,2);
y = rand(23,1);
a = ones(25,1);
x = [4,16]
z(:,1) = a;
I want to insert array y into the second column of array z in all positions apart from given in x, where the zeros should remain.
I have read this answer
but my case is a little different than it. Does anyone knows how to do it?