for i=1:length(wav)
if (rem(i,6) ~= 0)
wav(i) = 0;
end
end
The 6th value in the vector will be set to 0 (incorrect), but all the multiples of 6 will remain (which is correct). Strangely, this works correctly if I were to make it rem(i,7) or rem(i,4). Is this a machine precision error? If so, how do I go about fixing this?