Is this what you want to do?
a = [0:0.1:6*pi]';
z1 = [sin(a) sin(3*a) sin(5*a) sin(7*a)];
z2 = z1(:,1);
for k1 = 1:size(z1,2)-1
z2 = z2.*z1(:,k1+1);
end
figure(1)
plot(a, z1, ':')
hold on
plot(a, z2, '-r')
hold off
grid