--- Saving session to: ECE481_15-Apr-2003.txt --- startup.m processed OK --- ; ; ; ; ; ; fs = 10e3 fs = 10000 dur = 2 dur = 2 ss = randn(1,dur*fs); soundsc(ss,fs) soundsc(ss,fs) calspec(ss,[],fs) n=5 n = 5 fc = 1000 / (fs/2) fc = 0.2000 [b,a] = butter(n,fc) b = 0.0013 0.0064 0.0128 0.0128 0.0064 0.0013 a = 1.0000 -2.9754 3.8060 -2.5453 0.8811 -0.1254 y = filter(b,a,ss); soundsc(ss,fs) soundsc(y,fs) figure, calspec(y,[],fs) n=2 n = 2 [b,a] = butter(n,fc) b = 0.0675 0.1349 0.0675 a = 1.0000 -1.1430 0.4128 y = filter(b,a,ss); figure, calspec(y,[],fs) [H,F] = freqz(b,a,fs/2,fs); plot(F,abs(H)) freqz(b,a,fs/2,fs); frn=5 frn = 5 n=5 n = 5 clear delfigs type delfigs % Delete all figures delete(get(0,'Children')) acoeff = [] acoeff = [] bcoeff = [] bcoeff = [] for fc = 0.1 : 0.1 : 0.9 [b,a] = butter(5,fc); bcoeff = [bcoeff; b]; acoeff = [acoeff; a]; end bcoeff bcoeff = 0.0001 0.0003 0.0006 0.0006 0.0003 0.0001 0.0013 0.0064 0.0128 0.0128 0.0064 0.0013 0.0069 0.0347 0.0693 0.0693 0.0347 0.0069 0.0219 0.1097 0.2194 0.2194 0.1097 0.0219 0.0528 0.2639 0.5279 0.5279 0.2639 0.0528 0.1084 0.5419 1.0837 1.0837 0.5419 0.1084 0.2019 1.0094 2.0189 2.0189 1.0094 0.2019 0.3542 1.7708 3.5416 3.5416 1.7708 0.3542 0.5999 2.9997 5.9994 5.9994 2.9997 0.5999 acoeff acoeff = 1.0000 -3.9845 6.4349 -5.2536 2.1651 -0.3599 1.0000 -2.9754 3.8060 -2.5453 0.8811 -0.1254 1.0000 -1.9759 2.0135 -1.1026 0.3276 -0.0407 1.0000 -0.9853 0.9738 -0.3864 0.1112 -0.0113 1.0000 -0.0000 0.6334 -0.0000 0.0557 -0.0000 1.0000 0.9853 0.9738 0.3864 0.1112 0.0113 1.0000 1.9759 2.0135 1.1026 0.3276 0.0407 1.0000 2.9754 3.8060 2.5453 0.8811 0.1254 1.0000 3.9845 6.4349 5.2536 2.1651 0.3599 plot(bcoeff(:,1)) plot(bcoeff(:,2)) plot(bcoeff(:,3)) plot(bcoeff(:,4)) plot(acoeff(:,1)) plot(acoeff(:,2)) plot(acoeff(:,3)) plot(acoeff(:,4)) plot(acoeff(:,5)) exit