Take the simple frequency-domain band-pass filtering operation below . . .
NFFT = 128;
x = randn(NFFT,1);
H = zeros(NFFT,1);
H(10:20) = 1;
y = ifft(H.*fft(x), 'symmetric');
This gives a real output because I'm using the conjugate symmetric flag to the ifft operation.
I want a function that returns the conjugate symmetric version of H, so I do not have to rely on the builtin symmetric option in Matlab's ifft. NFFT can be any positive integer. This could be called something like this . .
H(10:20) = 1;
H = MakeConjSym(H);