It's not clear what you are trying to do, but that code will create a 2xN matrix with all zeros in the first row and all ones in the second row. So, to grab the zeros use C(1,j) and to grab the ones use C(2,j), where j is the column you are interested in.
I'm not sure I understand what you are trying to do. It seems you are trying to check a condition and if that condition is met, then you want to change the value. You also seem to be trying to do this by a vectorized method rather than an if statement. That would actually be a good idea if you put the statement outside the loop, but if you are inside the loop, why not use an if statement? If speed of execution is not critical, I prefer to write loops and if-statements rather than vectorized code.
Still, what you wrote is ambiguous and I cant figure out exactly what you are trying to do.
If you want to replace an element in an existing matrix, then just access that array element individually. If V has the values you want to replace, then V(2,3) =12; would put 12 in the V array at row 2 and column 3.
Surely you already know this, so I think I'm still not understanding your question.