I'm looking to plot a matrix using data from two arrays. If the second array has a number which is not zero in an element, this element is moved into the first array. I have seen how this might be done using deal(), but I would like to avoid using a loop with if statement for performance reasons. Is there a convenient way of doing this?
An example of this is follows, with arrays A, B and C ( the result);