% hwkx.filter.m % % EEC 116 % Final project output calculator coeffs = [4 63 250 63 4]; in = [0 0 0 0 1 11 116 255 255 255 255 255 58 0 0 0 0 0]; sat_level = 1000; % perform the filtering out=conv(coeffs, in); % print output for l=1:length(out), fprintf(1, '%s\n', real2unsigned(out(l),18,0)); end fprintf(1, '\n'); % print output with saturation for l=1:length(out), out_sat = saturate(out, sat_level, 0); fprintf(1, '%s\n', real2unsigned(out_sat(l),18,0)); end