% Program 7_10 % Design of Least-Squares Error Linear-Phase FIR Filters % N = input('Type in the order = '); fpts = input('Type in the bandedge vector = '); mag = input('Type in the magnitude value vector = '); wt = input('Type in the weight vector = '); b = firls(N,fpts,mag,wt); [h,w] = freqz(b,1,256); plot(w/pi,20*log10(abs(h)));grid; xlabel('\omega/\pi'); ylabel('Gain, dB');