h = @(n,wc,ws) 2*wc/ws*sinc(n*2*wc/ws); % impulse response of a lowpass filter in discrete domain, ws sampling angular frequency, wc cutoff frequency
h_causal = @(n,wc,ws,N) h(n-(N-1)/2,wc,ws); % causal version of impulse response

N = 33; % given in question
wc = 2*pi*500; % given in question
ws = 2*pi*8000; % given in question

i = 0:(N-1); % indexer, vector length is N-1.

bi = h_causal(i,wc,ws,length(i)); % FIR gains