How can I replace the zeros in one vector with values from another vector?
Here's my problem:
a = [1 2 0 0 3 0 5];
b = [4 3 2];
I want to fill in each zero in vector "a" with the numbers from vector "b" in the order presented, like such: [1 2 4 3 3 2 5]
Best Answer