I have the following piece of Matlab code trying to do a rough estimate for putting stereo signals into a mono signal.
%Putting in Mono
z1 = (y1(:,1)+y1(:,2))/2;
z2 = (y2(:,1)+y2(:,2))/2;
z3 = (y3(:,1)+y3(:,2))/2;
However, some of my values contain zeros, and I do not want to average a row if it has a zero; I would want to add these.
Only if there are two nonzero values would I want to average. How would I write this?
I apologize, I am very new to Matlab.
Best Answer