summaryrefslogtreecommitdiff
path: root/830
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /830
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '830')
-rwxr-xr-x830/CH1/EX1.2.1/Discrete_Time_Signal.sce13
-rwxr-xr-x830/CH10/EX10.5.1/FIR_DECIMATION_2.sce40
-rwxr-xr-x830/CH10/EX10.5.2/FIR_INTERPOLATION_5.sce40
-rwxr-xr-x830/CH10/EX10.6.1/Sampling_Rate_Conversion_Decimation.sce48
-rwxr-xr-x830/CH10/EX10.8.1/Signal_Distortion_Ratio.sce13
-rwxr-xr-x830/CH10/EX10.8.2/Signal_Distortion_Ratio_Linear_Interpolation.sce13
-rwxr-xr-x830/CH10/EX10.9.1/Sampling_Rate_Conversion_Decimation_Interpolation.sce42
-rwxr-xr-x830/CH11/EX11.6.1/Weiner_Filter.sce17
-rwxr-xr-x830/CH12/EX12.1.1/spectrum_of_signal.sce27
-rwxr-xr-x830/CH12/EX12.1.2/spectrum_using_DFT.sce81
-rwxr-xr-x830/CH12/EX12.5.1/Additive_Noise_Parameters.sce26
-rwxr-xr-x830/CH2/EX2.01.09/Exp_Inc.sce17
-rwxr-xr-x830/CH2/EX2.1.09/Exp_Dec.sce16
-rwxr-xr-x830/CH2/EX2.1.2/Transformation_in_Time1.sce45
-rwxr-xr-x830/CH2/EX2.1.24/even.sce14
-rwxr-xr-x830/CH2/EX2.1.25/odd.sce16
-rwxr-xr-x830/CH2/EX2.1.6/sample.sce14
-rwxr-xr-x830/CH2/EX2.1.7/step.sce14
-rwxr-xr-x830/CH2/EX2.1.8/ramp.sce14
-rwxr-xr-x830/CH2/EX2.1.9/Exp.sce14
-rwxr-xr-x830/CH3/EX1.0/_1_0.sce5
-rwxr-xr-x830/CH3/EX3.1.1/Direct_Ztransform.sce27
-rwxr-xr-x830/CH3/EX3.1.2/Signal1.sce10
-rwxr-xr-x830/CH3/EX3.1.4/Signal2.sce11
-rwxr-xr-x830/CH3/EX3.1.5/Signal_Sum.sce14
-rwxr-xr-x830/CH3/EX3.2.01/Signal3.sce13
-rwxr-xr-x830/CH3/EX3.2.1/signal3.sce13
-rwxr-xr-x830/CH3/EX3.2.10/Correlation_Property.sce14
-rwxr-xr-x830/CH3/EX3.2.2/sinusoidal_signals.sce17
-rwxr-xr-x830/CH3/EX3.2.3/Time_Shifting_Property.sce15
-rwxr-xr-x830/CH3/EX3.2.4/Unit_Step_Sequence.sce10
-rwxr-xr-x830/CH3/EX3.2.6/Unit_Step_Sequence_Leftsided.sce10
-rwxr-xr-x830/CH3/EX3.2.7/Differentaition_Property.sce11
-rwxr-xr-x830/CH3/EX3.2.9/Convolution_Property.sce13
-rwxr-xr-x830/CH4/EX4.02.7/Reconstruction.sce41
-rwxr-xr-x830/CH4/EX4.1.2/CTFT_1.sce41
-rwxr-xr-x830/CH4/EX4.2.07/DTFT_1.sce42
-rwxr-xr-x830/CH4/EX4.2.7/CTFT_2.sce38
-rwxr-xr-x830/CH4/EX4.3.4/Convolution_Property_DTFT.sce68
-rwxr-xr-x830/CH4/EX4.4.2/DTFT_3.sce29
-rwxr-xr-x830/CH4/EX4.4.4/DTFT_2.sce31
-rwxr-xr-x830/CH5/EX5.1.2/DFT1.sce35
-rwxr-xr-x830/CH5/EX5.1.3/DFT2.sce13
-rwxr-xr-x830/CH5/EX5.2.1/Circular_Conv_DFT.sce18
-rwxr-xr-x830/CH5/EX5.3.1/Linear_Filtering_DFT.sce39
-rwxr-xr-x830/CH5/EX5.4.1/Zero_Padding.sce25
-rwxr-xr-x830/CH6/EX6.11/FFT_Exercise2.sce11
-rwxr-xr-x830/CH6/EX6.4.1/SNR_DFT.sce14
-rwxr-xr-x830/CH6/EX6.4.2/SNR_FFT_ALGORITHM.sce14
-rwxr-xr-x830/CH6/EX6.8/FFT_Exercise1.sce11
-rwxr-xr-x830/CH7/EX6.4.17/SQNR_IN_FFT_ALGORITHM.sce20
-rwxr-xr-x830/CH7/EX7.6.3/COEFFICIENT_QUANTIZATION_NOISE.sce11
-rwxr-xr-x830/CH7/EX7.7.01/Roundoffnoise_Cascade_Realization.sce25
-rwxr-xr-x830/CH7/EX7.7.1/DEAD_BAND.sce15
-rwxr-xr-x830/CH8/EX08.3.6/IIR_ButterworthFilter_Parameters_1.sce30
-rwxr-xr-x830/CH8/EX1.08/FIR_BSF_1_08.sce43
-rwxr-xr-x830/CH8/EX1.8/FIR_BPF_1_8.sce45
-rwxr-xr-x830/CH8/EX2.8/FIR_HPF_2_8.sce36
-rwxr-xr-x830/CH8/EX8.03.06/IIR_ButterworthFilter_Parameters_1.sce30
-rwxr-xr-x830/CH8/EX8.03.5/IIR_Butter_LPF.sce22
-rwxr-xr-x830/CH8/EX8.03.6/IIR_ButterworthFilter_LPF.sce30
-rwxr-xr-x830/CH8/EX8.10/FIR_LPF_1.sce37
-rwxr-xr-x830/CH8/EX8.2.1/Freq_Sampling_Technique1.sce38
-rwxr-xr-x830/CH8/EX8.2.2/Freq_Sampling_Technique2.sce39
-rwxr-xr-x830/CH8/EX8.2.3/FIR_LPF.sce25
-rwxr-xr-x830/CH8/EX8.2.4/FIR_BPF.sce31
-rwxr-xr-x830/CH8/EX8.2.5/FIR_Differentiator.sce26
-rwxr-xr-x830/CH8/EX8.2.6/Hilbert_Transformer.sce47
-rwxr-xr-x830/CH8/EX8.3.05/IIR_Butter_Transformation_HPF.sce25
-rwxr-xr-x830/CH8/EX8.3.06/IIR_Butter_LPF_To_HPF.sce92
-rwxr-xr-x830/CH8/EX8.3.2/Backward_Difference.sce12
-rwxr-xr-x830/CH8/EX8.3.4/Bilinear_Transformation.sce15
-rwxr-xr-x830/CH8/EX8.3.5/Single_pole_filter.sce50
-rwxr-xr-x830/CH8/EX8.3.6/IIR_Butter_Analog_Filters.sce41
-rwxr-xr-x830/CH8/EX8.3.7/IIR_Chebychev_Filter_analog.sce40
-rwxr-xr-x830/CH8/EX8.4.02/IIR_Butter_Transformation_BSF.sce27
-rwxr-xr-x830/CH8/EX8.4.1/IIR_ButterworthFilter_Transformation_3.sce17
-rwxr-xr-x830/CH8/EX8.4.2/IIR_Butter_Transformation_BPF.sce62
-rwxr-xr-x830/CH8/EX8.5/Window_Functions.sce16
-rwxr-xr-x830/CH8/EX8.6/Frequency_Response_Window.sce35
-rwxr-xr-x830/DEPENDENCIES/sinc_new4_02_7.sci6
-rwxr-xr-x830/DEPENDENCIES/sinc_new4_8.sci6
82 files changed, 2171 insertions, 0 deletions
diff --git a/830/CH1/EX1.2.1/Discrete_Time_Signal.sce b/830/CH1/EX1.2.1/Discrete_Time_Signal.sce
new file mode 100755
index 000000000..22a705ea0
--- /dev/null
+++ b/830/CH1/EX1.2.1/Discrete_Time_Signal.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Implementation of Equation 1.2.1 in Chapter 1
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 9
+
+clear; clc; close;
+n = 0:10;
+x = (0.8)^n;
+//plot2d4(n,x)
+a=gca();
+a.thickness = 2;
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Discrete Time Signal','n','x[n]');
diff --git a/830/CH10/EX10.5.1/FIR_DECIMATION_2.sce b/830/CH10/EX10.5.1/FIR_DECIMATION_2.sce
new file mode 100755
index 000000000..3d74a3a92
--- /dev/null
+++ b/830/CH10/EX10.5.1/FIR_DECIMATION_2.sce
@@ -0,0 +1,40 @@
+//Graphical//
+//Example 10.5.1
+//Decimation by 2, Filter Length = 30
+//Cutoff Frequency Wc = %pi/2
+//Pass band Edge frequency fp = 0.25 and a Stop band edge frequency fs = 0.31
+// Choose the number of cosine functions and create a dense grid
+// in [0,0.25] and [0.31,0.5]
+//magnitude for pass band = 1 & stop band = 0 (i.e) [1 0]
+//Weighting function =[2 1]
+clear;
+clc;
+close;
+M = 30; //Filter Length
+D = 2; //Decimation Factor = 2
+Wc = %pi/2; //Cutoff Frequency
+Wp = Wc/(2*%pi); //Passband Edge Frequency
+Ws = 0.31; //Stopband Edge Frequency
+hn=eqfir(M,[0 Wp;Ws .5],[1 0],[2 1]);
+[hm,fr]=frmag(hn,256);
+disp('The LPF Filter Coefficients are:')
+hn
+//Obtaining Polyphase Filter Coefficients from hn
+p = zeros(D,M/D);
+for k = 1:D
+ for n = 1:(length(hn)/D)
+ p(k,n) = hn(D*(n-1)+k);
+ end
+end
+disp('The Polyphase Decimator for D =2 are:')
+p
+figure
+plot(fr,hm)
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
+figure
+plot(.5*(0:255)/256,20*log10(frmag(hn,256)));
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude in dB');
+title('Frequency Response of DECIMATOR (D=2) using REMEZ algorithm M=30')
diff --git a/830/CH10/EX10.5.2/FIR_INTERPOLATION_5.sce b/830/CH10/EX10.5.2/FIR_INTERPOLATION_5.sce
new file mode 100755
index 000000000..1720e5155
--- /dev/null
+++ b/830/CH10/EX10.5.2/FIR_INTERPOLATION_5.sce
@@ -0,0 +1,40 @@
+//Graphical//
+//Example 10.5.2
+//Interpolation by 5, Filter Length = 30
+//Cutoff Frequency Wc = %pi/5
+//Pass band Edge frequency fp = 0.1 and a Stop band edge frequency fs = 0.16
+// Choose the number of cosine functions and create a dense grid
+// in [0,0.1) and [0.16,0.5)
+//magnitude for pass band = 1 & stop band = 0 (i.e) [1 0]
+//Weighting function =[3 1]
+clear;
+clc;
+close;
+M = 30; //Filter Length
+I = 5; //Interpolation Factor = 5
+Wc = %pi/5; //Cutoff Frequency
+Wp = Wc/(2*%pi); //Passband Edge Frequency
+Ws = 0.16; //Stopband Edge Frequency
+hn=eqfir(M,[0 Wp;Ws .5],[1 0],[3 1]);
+[hm,fr]=frmag(hn,256);
+disp('The LPF Filter Coefficients are:')
+hn
+//Obtaining Polyphase Filter Coefficients from hn
+p = zeros(I,M/I);
+for k = 1:I
+ for n = 1:(length(hn)/I)
+ p(k,n) = hn(I*(n-1)+k);
+ end
+end
+disp('The Polyphase Interpolator for I =5 are:')
+p
+figure
+plot(fr,hm)
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
+figure
+plot(.5*(0:255)/256,20*log10(frmag(hn,256)));
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude in dB');
+title('Frequency Response of INTERPOLATOR(I=5) using REMEZ algorithm M=30')
diff --git a/830/CH10/EX10.6.1/Sampling_Rate_Conversion_Decimation.sce b/830/CH10/EX10.6.1/Sampling_Rate_Conversion_Decimation.sce
new file mode 100755
index 000000000..6ee05b0f2
--- /dev/null
+++ b/830/CH10/EX10.6.1/Sampling_Rate_Conversion_Decimation.sce
@@ -0,0 +1,48 @@
+//Graphical//
+//Example 10.6.1
+//Multistage Implementation of Sampling Rate Conversion
+//Decimation factor D = 50
+//D = D1xD2, D1 = 25, D2 =2
+clear;
+clc;
+close;
+Fs = 8000; //Sampling Frequency = 8000Hz
+Fpc = 75; //Passband Frequency
+Fsc = 80; //Stopband Frequency
+Delta_F = (Fsc-Fpc)/Fs; //Transition Band
+Pass_Band = [0,Fpc];
+Transition_Band = [Fpc,Fsc];
+Delta1 = (10^-2); //Passband Ripple
+Delta2 = (10^-4); //Stopband Ripple
+D = Fs/(2*Fsc); //Decimation Factor
+//Decimator Implemented in Two Stages
+D1 = D/2; //Decimator 1
+D2 = 2; //Decimator 2
+//Decimator Single Stage Implementation
+M = ((-10*log10(Delta1*Delta2)-13)/(14.6*Delta_F))+1;
+M = ceil(M)
+//Decimator Multistage Implementation
+//First Stage Implementation
+F1 = Fs/D1; //New passband for stage1
+Fsc1 = F1-Fsc; //New Stopband for stage1
+Delta_F1 = (Fsc1-Fpc)/Fs //New Transition for stage1
+Delta11 = Delta1/2; //New Passband Ripple
+Delta21 = Delta2; //Stopband Ripple same
+M1 = ((-10*log10(Delta11*Delta21)-13)/(14.6*Delta_F1))+1
+M1 = floor(M1)
+//Second Stage Implementation
+F2 = F1/D2; //New passband for stage2
+Fsc2 = F2-Fsc; //New Stopband for stage2
+Delta_F2 = (Fsc2-Fpc)/F1 //New Transition for stage2
+Delta12 = Delta1/2; //New Passband Ripple
+Delta22 = Delta2; //Stopband Ripple same
+M2 = ((-10*log10(Delta12*Delta22)-13)/(14.6*Delta_F2))+1
+M2 = floor(M2)
+disp('The Filter length Required in Single stage Implementation of Decimator is:')
+M
+disp('The Filter length Required in Multistage Implementation of Decimator is:')
+M1+M2
+//Calculation of Reduction Factor
+R = M/(M1+M2);
+disp('The Reduction in Filter Length is:')
+R
diff --git a/830/CH10/EX10.8.1/Signal_Distortion_Ratio.sce b/830/CH10/EX10.8.1/Signal_Distortion_Ratio.sce
new file mode 100755
index 000000000..58888f4f6
--- /dev/null
+++ b/830/CH10/EX10.8.1/Signal_Distortion_Ratio.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Example 10.8.1
+//Signal to Distortion Ratio
+//Calculation of no. of subfilters
+clear;
+clc;
+close;
+SDR_dB = 50; //Signal to distortion ratio = 50 dB
+Wx = 0.8*%pi; //Digital maximum frequency of input data
+SDR = 10^(SDR_dB/10)
+disp('The Number of subfilters required')
+I = Wx*sqrt(SDR/12);
+I = ceil(I)
diff --git a/830/CH10/EX10.8.2/Signal_Distortion_Ratio_Linear_Interpolation.sce b/830/CH10/EX10.8.2/Signal_Distortion_Ratio_Linear_Interpolation.sce
new file mode 100755
index 000000000..7ec3f6856
--- /dev/null
+++ b/830/CH10/EX10.8.2/Signal_Distortion_Ratio_Linear_Interpolation.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Example 10.8.2
+//Signal to Distortion Ratio using Linear Interpolation
+//Calculation of no. of subfilters
+clear;
+clc;
+close;
+SDR_dB = 50; //Signal to distortion ratio = 50 dB
+Wx = 0.8*%pi; //Digital maximum frequency of input data
+SDR = 10^(SDR_dB/10)
+disp('The Number of subfilters required')
+I = Wx*((SDR/80)^(1/4));
+I = ceil(I)
diff --git a/830/CH10/EX10.9.1/Sampling_Rate_Conversion_Decimation_Interpolation.sce b/830/CH10/EX10.9.1/Sampling_Rate_Conversion_Decimation_Interpolation.sce
new file mode 100755
index 000000000..13b45645e
--- /dev/null
+++ b/830/CH10/EX10.9.1/Sampling_Rate_Conversion_Decimation_Interpolation.sce
@@ -0,0 +1,42 @@
+//Graphical//
+//Example 10.9.1
+//Multistage Implementation of Sampling Rate Conversion
+//Decimation factor D = 100
+//D = D1xD2, D1 = 50, D2 =2
+//Interpolation factor I = 100
+//I = I1xI2, I1 = 2, I2 =50
+clear;
+clc;
+close;
+Fs = 8000; //Sampling Frequency = 8000Hz
+Fpc = 75; //Passband Frequency
+Fsc = 80; //Stopband Frequency
+Delta_F = (Fsc-Fpc)/Fs; //Transition Band
+Pass_Band = [0,Fpc];
+Transition_Band = [Fpc,Fsc];
+Delta1 = (10^-2); //Passband Ripple
+Delta2 = (10^-4); //Stopband Ripple
+D = Fs/(2*Fsc); //Decimation Factor
+//Decimator Implemented in Two Stages
+D1 = D/2; //Decimator 1
+D2 = 2; //Decimator 2
+//Decimator Single Stage Implementation
+M = ((-10*log10(Delta1*Delta2/2)-13)/(14.6*Delta_F))+1;
+M = ceil(M)
+//Decimator Multistage Implementation
+//First Stage Implementation
+Delta_F1 = 0.020625 //Obtained from Example 10.6.1
+M1 = ((-10*log10(Delta1*Delta2/4)-13)/(14.6*Delta_F1))+1
+M1 = floor(M1)
+//Second Stage Implementation
+Delta_F2 = 0.015625 //Obtained from Example 10.6.1
+M2 = ((-10*log10(Delta1*Delta2/4)-13)/(14.6*Delta_F2))+1
+M2 = floor(M2)
+disp('The Filter length Required in Single stage Implementation of Decimator is:')
+M
+disp('The Filter length Required in Multistage Implementation of Decimator is:')
+M1+M2
+//Calculation of Reduction Factor
+R = M/(M1+M2);
+disp('The Reduction in Filter Length is:')
+R
diff --git a/830/CH11/EX11.6.1/Weiner_Filter.sce b/830/CH11/EX11.6.1/Weiner_Filter.sce
new file mode 100755
index 000000000..b5cc11fa8
--- /dev/null
+++ b/830/CH11/EX11.6.1/Weiner_Filter.sce
@@ -0,0 +1,17 @@
+//Graphical//
+//Example 11.6.1
+//Design of wiener filter of Length M =2
+clear;
+close;
+clc;
+M =2; //Wiener Filter Length
+Rdx = [0.6 2 0.6] //Cross correlation matrix between the desired input sequence and actual input sequence
+C = Rdx(M:$) //Right sided sequence
+To_M = toeplitz(C)
+Rxx = [0.6 1 0.6] //Auto correlation matrix
+Rss = Rxx(M:$)
+//Filter coefficients
+h = [0.451 0.165]
+//Calculation of Minimum Mean Square Error
+sigma_d = 1; //Average power of desired sequence
+MSE = sigma_d - h*Rss'
diff --git a/830/CH12/EX12.1.1/spectrum_of_signal.sce b/830/CH12/EX12.1.1/spectrum_of_signal.sce
new file mode 100755
index 000000000..32b8c187f
--- /dev/null
+++ b/830/CH12/EX12.1.1/spectrum_of_signal.sce
@@ -0,0 +1,27 @@
+//Graphical//
+//Example 12.1.1
+//Determination of spectrum of a signal
+//With maximum normalized frequency f = 0.1
+//using Rectangular window and Blackmann window
+clear;
+close;
+clc;
+N = 61;
+cfreq = [0.1 0];
+[wft,wfm,fr]=wfir('lp',N,cfreq,'re',0);
+wft; // Time domain filter coefficients
+wfm; // Frequency domain filter values
+fr; // Frequency sample points
+WFM_dB = 20*log10(wfm);//Frequency response in dB
+for n = 1:N
+ h_balckmann(n)=0.42-0.5*cos(2*%pi*n/(N-1))+0.08*cos(4*%pi*n/(N-1));
+end
+wft_blmn = wft'.*h_balckmann;
+wfm_blmn = frmag(wft_blmn,length(fr));
+WFM_blmn_dB =20*log10(wfm_blmn);
+subplot(2,1,1)
+plot2d(fr,WFM_dB)
+xtitle('Frequency Response of Rectangular window Filtered output M = 61','Frequency in cycles per samples f','Energy density in dB')
+subplot(2,1,2)
+plot2d(fr,WFM_blmn_dB)
+xtitle('Frequency Response of Blackmann window Filtered output M = 61','Frequency in cycles per samples f','Energy density in dB')
diff --git a/830/CH12/EX12.1.2/spectrum_using_DFT.sce b/830/CH12/EX12.1.2/spectrum_using_DFT.sce
new file mode 100755
index 000000000..506617bcb
--- /dev/null
+++ b/830/CH12/EX12.1.2/spectrum_using_DFT.sce
@@ -0,0 +1,81 @@
+//Graphical//
+//Example 12.1.2
+//Evaluating power spectrum of a discrete sequence
+//Using N-point DFT
+clear;
+clc;
+close;
+N =16; //Number of samples in given sequence
+n =0:N-1;
+delta_f = [0.06,0.01];//frequency separation
+x1 = sin(2*%pi*0.315*n)+cos(2*%pi*(0.315+delta_f(1))*n);
+x2 = sin(2*%pi*0.315*n)+cos(2*%pi*(0.315+delta_f(2))*n);
+L = [8,16,32,128];
+k1 = 0:L(1)-1;
+k2 = 0:L(2)-1;
+k3 = 0:L(3)-1;
+k4 = 0:L(4)-1;
+fk1 = k1./L(1);
+fk2 = k2./L(2);
+fk3 = k3./L(3);
+fk4 = k4./L(4);
+for i =1:length(fk1)
+ Pxx1_fk1(i) = 0;
+ Pxx2_fk1(i) = 0;
+ for m = 1:N
+ Pxx1_fk1(i)=Pxx1_fk1(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk1(i));
+ Pxx2_fk1(i)=Pxx1_fk1(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk1(i));
+ end
+ Pxx1_fk1(i) = (Pxx1_fk1(i)^2)/N;
+ Pxx2_fk1(i) = (Pxx2_fk1(i)^2)/N;
+end
+for i =1:length(fk2)
+ Pxx1_fk2(i) = 0;
+ Pxx2_fk2(i) = 0;
+ for m = 1:N
+ Pxx1_fk2(i)=Pxx1_fk2(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk2(i));
+ Pxx2_fk2(i)=Pxx1_fk2(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk2(i));
+ end
+ Pxx1_fk2(i) = (Pxx1_fk2(i)^2)/N;
+ Pxx2_fk2(i) = (Pxx1_fk2(i)^2)/N;
+end
+for i =1:length(fk3)
+ Pxx1_fk3(i) = 0;
+ Pxx2_fk3(i) = 0;
+ for m = 1:N
+ Pxx1_fk3(i) =Pxx1_fk3(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk3(i));
+ Pxx2_fk3(i) =Pxx1_fk3(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk3(i));
+ end
+ Pxx1_fk3(i) = (Pxx1_fk3(i)^2)/N;
+ Pxx2_fk3(i) = (Pxx1_fk3(i)^2)/N;
+end
+for i =1:length(fk4)
+ Pxx1_fk4(i) = 0;
+ Pxx2_fk4(i) = 0;
+ for m = 1:N
+ Pxx1_fk4(i) =Pxx1_fk4(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk4(i));
+ Pxx2_fk4(i) =Pxx1_fk4(i)+x1(m)*exp(-sqrt(-1)*2*%pi*(m-1)*fk4(i));
+ end
+ Pxx1_fk4(i) = (Pxx1_fk4(i)^2)/N;
+ Pxx2_fk4(i) = (Pxx1_fk4(i)^2)/N;
+end
+figure
+title('for frequency separation = 0.06')
+subplot(2,2,1)
+plot2d3('gnn',k1,abs(Pxx1_fk1))
+subplot(2,2,2)
+plot2d3('gnn',k2,abs(Pxx1_fk2))
+subplot(2,2,3)
+plot2d3('gnn',k3,abs(Pxx1_fk3))
+subplot(2,2,4)
+plot2d3('gnn',k4,abs(Pxx1_fk4))
+figure
+title('for frequency separation = 0.01')
+subplot(2,2,1)
+plot2d3('gnn',k1,abs(Pxx2_fk1))
+subplot(2,2,2)
+plot2d3('gnn',k2,abs(Pxx2_fk2))
+subplot(2,2,3)
+plot2d3('gnn',k3,abs(Pxx2_fk3))
+subplot(2,2,4)
+plot2d3('gnn',k4,abs(Pxx2_fk4))
diff --git a/830/CH12/EX12.5.1/Additive_Noise_Parameters.sce b/830/CH12/EX12.5.1/Additive_Noise_Parameters.sce
new file mode 100755
index 000000000..b59e316b7
--- /dev/null
+++ b/830/CH12/EX12.5.1/Additive_Noise_Parameters.sce
@@ -0,0 +1,26 @@
+//Graphical//
+//Example 12.5.1
+//Determination of power, frequency and varaince of
+//Additive noise
+clear;
+clc;
+close;
+ryy = [0,1,3,1,0];//Autocorrelation of signal
+cen_ter_value = ceil(length(ryy)/2);//center value of autocorrelation
+//Method1
+//TO find out the variance of the additive Noise
+C = ryy(ceil(length(ryy)/2):$);
+corr_matrix = toeplitz(C);//correlation matrix
+evals =spec(corr_matrix);//Eigen Values computation
+sigma_w = min(evals);//Minimum of eigen value = varinace of noise
+//Method2
+//TO find out the variance of the additive Noise
+P = [1,-sqrt(2),1];//Ploynomial in decreasing order
+Z = roots(P);//roots of the polynomial
+P1 = ryy(cen_ter_value+1)/real(Z(1));//power of the sinusoid
+A = sqrt(2*P1);//amplitude of the sinusoid
+sigma_w1 = ryy(cen_ter_value)-P1;//variance of noise method2
+disp(P1,'Power of the additive noise')
+f1 = acos(real(Z(1)))/(2*%pi)
+disp(f1,'frequency of the additive noise')
+disp(sigma_w1,'Variance of the additive noise')
diff --git a/830/CH2/EX2.01.09/Exp_Inc.sce b/830/CH2/EX2.01.09/Exp_Inc.sce
new file mode 100755
index 000000000..93c60d13f
--- /dev/null
+++ b/830/CH2/EX2.01.09/Exp_Inc.sce
@@ -0,0 +1,17 @@
+//Graphical//
+//Implementation of Equation 2.01.09b in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 46
+// a < 0
+clear;
+clc;
+close;
+a =-1.5;
+n = 0:10;
+x = (a)^n;
+a=gca();
+a.thickness = 2;
+a.x_location = "origin";
+a.y_location = "origin";
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Exponential Increasing-Decreasing Signal','n','x[n]');
diff --git a/830/CH2/EX2.1.09/Exp_Dec.sce b/830/CH2/EX2.1.09/Exp_Dec.sce
new file mode 100755
index 000000000..f84a9583b
--- /dev/null
+++ b/830/CH2/EX2.1.09/Exp_Dec.sce
@@ -0,0 +1,16 @@
+//Graphical//
+//Implementation of Equation 2.1.09c in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 46
+// a < 1
+clear;
+clc;
+close;
+a =0.5;
+n = 0:10;
+x = (a)^n;
+a=gca();
+a.thickness = 2;
+a.x_location = "middle";
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Exponential Decreasing Signal','n','x[n]');
diff --git a/830/CH2/EX2.1.2/Transformation_in_Time1.sce b/830/CH2/EX2.1.2/Transformation_in_Time1.sce
new file mode 100755
index 000000000..99501a0a5
--- /dev/null
+++ b/830/CH2/EX2.1.2/Transformation_in_Time1.sce
@@ -0,0 +1,45 @@
+//Graphical//
+//Implementation of Eample 2.1.2 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 52
+
+
+clear;
+clc;
+close;
+
+x = [0 0 0 -1 0 1 2 3 4 5 5 5 5 5];
+
+x1 = [0 0 0 x]; //x(n-3)
+
+x2 =[x 0 0]; //x(n+2)
+
+
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+a.x_location = "middle"
+
+subplot(3,1,1)
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+a.x_location = "middle"
+plot2d3('gnn',1:length(x),x)
+xtitle('Graphical Representation of signal x',' ---> n',' --->x[n]');
+
+subplot(3,1,2)
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+a.x_location = "middle"
+plot2d3('gnn',x1)
+xtitle('Graphical Representation of signal delayed version of x',' ---> n',' --->x[n-3]');
+
+subplot(3,1,3)
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+a.x_location = "middle"
+plot2d3('gnn',x2)
+xtitle('Graphical Representation of signal advanced version of x',' ---> n',' --->x[n+2]');
diff --git a/830/CH2/EX2.1.24/even.sce b/830/CH2/EX2.1.24/even.sce
new file mode 100755
index 000000000..081bb1533
--- /dev/null
+++ b/830/CH2/EX2.1.24/even.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Implementation of Equation 2.1.24 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 51
+
+clear; clc; close;
+n = -7:7;
+x1 = [0 0 0 1 2 3 4];
+x = [x1,5,x1(length(x1):-1:1)];
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Even Signal','n','x[n]');
diff --git a/830/CH2/EX2.1.25/odd.sce b/830/CH2/EX2.1.25/odd.sce
new file mode 100755
index 000000000..733d9c606
--- /dev/null
+++ b/830/CH2/EX2.1.25/odd.sce
@@ -0,0 +1,16 @@
+//Graphical//
+//Implementation of Equation 2.1.25 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 51
+clear;
+clc;
+close;
+n = -5:5;
+x1 = [0 1 2 3 4 5];
+x = [-x1($:-1:2),x1];
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+a.x_location = "middle"
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of ODD Signal',' n',' x[n]');
diff --git a/830/CH2/EX2.1.6/sample.sce b/830/CH2/EX2.1.6/sample.sce
new file mode 100755
index 000000000..2aed758d8
--- /dev/null
+++ b/830/CH2/EX2.1.6/sample.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Implementation of Equation 2.1.6 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 45
+
+clear; clc; close;
+L = 4; //Upperlimit
+n = -L:L;
+x = [zeros(1,L),1,zeros(1,L)];
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Unit Sample Sequence','n','x[n]');
diff --git a/830/CH2/EX2.1.7/step.sce b/830/CH2/EX2.1.7/step.sce
new file mode 100755
index 000000000..e3426b8df
--- /dev/null
+++ b/830/CH2/EX2.1.7/step.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Implementation of Equation 2.1.7 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 45
+
+clear; clc; close;
+L = 4; //Upperlimit
+n = -L:L;
+x = [zeros(1,L),ones(1,L+1)];
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Unit Step Signal','n','x[n]');
diff --git a/830/CH2/EX2.1.8/ramp.sce b/830/CH2/EX2.1.8/ramp.sce
new file mode 100755
index 000000000..559330533
--- /dev/null
+++ b/830/CH2/EX2.1.8/ramp.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Implementation of Equation 2.1.8 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 45
+
+clear; clc; close;
+L = 4; //Upperlimit
+n = -L:L;
+x = [zeros(1,L),0:L];
+a=gca();
+a.thickness = 2;
+a.y_location = "middle";
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Unit Ramp Signal','n','x[n]');
diff --git a/830/CH2/EX2.1.9/Exp.sce b/830/CH2/EX2.1.9/Exp.sce
new file mode 100755
index 000000000..86473466c
--- /dev/null
+++ b/830/CH2/EX2.1.9/Exp.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Implementation of Equation 2.1.9 in Chapter 2
+//Digital Signal Processing by Proakis, Third Edition, PHI
+//Page 46
+clear;
+clc;
+close;
+a =1.5;
+n =1:10;
+x = (a)^n;
+a=gca();
+a.thickness = 2;
+plot2d3('gnn',n,x)
+xtitle('Graphical Representation of Exponential Signal','n','x[n]');
diff --git a/830/CH3/EX1.0/_1_0.sce b/830/CH3/EX1.0/_1_0.sce
new file mode 100755
index 000000000..8f4a51314
--- /dev/null
+++ b/830/CH3/EX1.0/_1_0.sce
@@ -0,0 +1,5 @@
+//Graphical//
+function [Ztransfer]=ztransfer_new(sequence,n)
+z = poly(0, 'z', 'r')
+Ztransfer=sequence*(1/z)^n'
+endfunction
diff --git a/830/CH3/EX3.1.1/Direct_Ztransform.sce b/830/CH3/EX3.1.1/Direct_Ztransform.sce
new file mode 100755
index 000000000..8fc9a9e85
--- /dev/null
+++ b/830/CH3/EX3.1.1/Direct_Ztransform.sce
@@ -0,0 +1,27 @@
+//Graphical//
+//Example 3.1.1
+//Z Transform of Finite Duration SIgnals
+clear;
+clc;
+close;
+x1 = [1,2,5,7,0,1];
+n1 = 0:length(x1)-1;
+X1 = ztransfer_new(x1,n1)
+x2 = [1,2,5,7,0,1];
+n2 = -2:3;
+X2 = ztransfer_new(x2,n2)
+x3 =[0,0,1,2,5,7,0,1];
+n3 = 0:length(x3)-1;
+X3 = ztransfer_new(x3,n3)
+x4 = [2,4,5,7,0,1];
+n4 = -2:3;
+X4 = ztransfer_new(x4,n4)
+x5 = [1,0,0]; //S(n) Unit Impulse sequence
+n5 = 0:length(x5)-1;
+X5 = ztransfer_new(x5,n5)
+x6 = [0,0,0,1]; //S(n-3) unit impulse sequence shifted
+n6 = 0:length(x6)-1;
+X6 = ztransfer_new(x6,n6)
+x7 = [1,0,0,0]; //S(n+3) Unit impulse sequence shifted
+n7 = -3:0;
+X7 = ztransfer_new(x7,n7)
diff --git a/830/CH3/EX3.1.2/Signal1.sce b/830/CH3/EX3.1.2/Signal1.sce
new file mode 100755
index 000000000..3576d3bd4
--- /dev/null
+++ b/830/CH3/EX3.1.2/Signal1.sce
@@ -0,0 +1,10 @@
+//Graphical//
+//Example 3.1.2
+//Z transform of x[n] = (0.5)^n. u[n]
+clear;
+clc;
+close;
+syms n z;
+x=(0.5)^n
+X=symsum(x*(z^(-n)),n,0,%inf)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.1.4/Signal2.sce b/830/CH3/EX3.1.4/Signal2.sce
new file mode 100755
index 000000000..9f5f8133f
--- /dev/null
+++ b/830/CH3/EX3.1.4/Signal2.sce
@@ -0,0 +1,11 @@
+//Graphical//
+//Example 3.1.4
+//Z transform of x[n] = -alpha^n. u[-n-1]
+//alpha = 0.5
+clear;
+close;
+clc;
+syms n z;
+x=-(0.5)^(-n)
+X=symsum(x*(z^(n)),n,1,%inf)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.1.5/Signal_Sum.sce b/830/CH3/EX3.1.5/Signal_Sum.sce
new file mode 100755
index 000000000..285ca96f8
--- /dev/null
+++ b/830/CH3/EX3.1.5/Signal_Sum.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Example 3.1.5
+//Z transform of x[n] = a^n.u[n]+b^n.u[-n-1]
+//a = 0.5 and b = 0.6
+clear;
+close;
+clc;
+syms n z;
+x1=(0.5)^(n)
+X1=symsum(x1*(z^(-n)),n,0,%inf)
+x2=(0.6)^(-n)
+X2=symsum(x2*(z^(n)),n,1,%inf)
+X = (X1+X2)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.2.01/Signal3.sce b/830/CH3/EX3.2.01/Signal3.sce
new file mode 100755
index 000000000..cbd497026
--- /dev/null
+++ b/830/CH3/EX3.2.01/Signal3.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Example 3.2.01
+//Z transform of x[n] = 3.2^n.u[n]-4.3^n.u[n]
+clear;
+close;
+clc;
+syms n z;
+x1=(2)^(n)
+X1=symsum(3*x1*(z^(-n)),n,0,%inf)
+x2=(3)^(n)
+X2=symsum(4*x2*(z^(-n)),n,0,%inf)
+X = (X1-X2)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.2.1/signal3.sce b/830/CH3/EX3.2.1/signal3.sce
new file mode 100755
index 000000000..536e354df
--- /dev/null
+++ b/830/CH3/EX3.2.1/signal3.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Example 3.2.1
+//Z transform of x[n] = 3.2^n.u[n]-4.3^n.u[n]
+clear;
+close;
+clc;
+syms n z;
+x1=(2)^(n)
+X1=symsum(3*x1*(z^(-n)),n,0,%inf)
+x2=(3)^(n)
+X2=symsum(4*x2*(z^(-n)),n,0,%inf)
+X = (X1-X2)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.2.10/Correlation_Property.sce b/830/CH3/EX3.2.10/Correlation_Property.sce
new file mode 100755
index 000000000..f700770d9
--- /dev/null
+++ b/830/CH3/EX3.2.10/Correlation_Property.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Example 3.2.10
+//Correlation Property Proof
+syms n z;
+x1 = (0.5)^n
+X1 = symsum(x1*(z^(-n)),n,0,%inf)
+X2 = symsum(x1*(z^(n)),n,0,%inf)
+disp(X1,"X1 =")
+disp(X2,"X2 =")
+X = X1*X2
+disp(X,"X=")
+//Result
+//Which is equivalent to Rxx(Z) = 1/(1-0.5(z+z^-1)+(0.5^2))
+//i.e for a = 0.5 Rxx(Z) = 1/(1-a(z+z^-1)+(a^2))
diff --git a/830/CH3/EX3.2.2/sinusoidal_signals.sce b/830/CH3/EX3.2.2/sinusoidal_signals.sce
new file mode 100755
index 000000000..ff5965431
--- /dev/null
+++ b/830/CH3/EX3.2.2/sinusoidal_signals.sce
@@ -0,0 +1,17 @@
+//Graphical//
+//Example 3.2.2
+//Z transform of x[n] = cos(Wo.n).u[n]
+//Z transform of y[n] = sin(Wo.n).u[n]
+clear;
+close;
+clc;
+syms n z;
+Wo =2;
+x1=exp(sqrt(-1)*Wo*n);
+X1=symsum(x1*(z^(-n)),n,0,%inf);
+x2=exp(-sqrt(-1)*Wo*n);
+X2=symsum(x2*(z^(-n)),n,0,%inf)
+X =(X1+X2)
+disp(X,"ans=")
+Y =(1/(2*sqrt(-1)))*(X1-X2)
+disp(Y,"ans=")
diff --git a/830/CH3/EX3.2.3/Time_Shifting_Property.sce b/830/CH3/EX3.2.3/Time_Shifting_Property.sce
new file mode 100755
index 000000000..cdb9f6f3e
--- /dev/null
+++ b/830/CH3/EX3.2.3/Time_Shifting_Property.sce
@@ -0,0 +1,15 @@
+//Graphical//
+//Example 3.2.3
+//Time Shifting Property of Z-transform
+clear;
+clc;
+close;
+x1 = [1,2,5,7,0,1];
+n1 = 0:length(x1)-1;
+X1 = ztransfer_new(x1,n1)
+//x2 = [1,2,5,7,0,1];
+n2 = 0-2:length(x1)-1-2;
+X2 = ztransfer_new(x1,n2)
+//x3 =[0,0,1,2,5,7,0,1];
+n3 = 0+2:length(x1)-1+2;
+X3 = ztransfer_new(x1,n3)
diff --git a/830/CH3/EX3.2.4/Unit_Step_Sequence.sce b/830/CH3/EX3.2.4/Unit_Step_Sequence.sce
new file mode 100755
index 000000000..6533fe156
--- /dev/null
+++ b/830/CH3/EX3.2.4/Unit_Step_Sequence.sce
@@ -0,0 +1,10 @@
+//Graphical//
+//Example 3.2.4
+//Z transform of x[n] = u[n]
+clear;
+clc;
+close;
+syms n z;
+x=(1)^n
+X=symsum(x*(z^(-n)),n,0,%inf)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.2.6/Unit_Step_Sequence_Leftsided.sce b/830/CH3/EX3.2.6/Unit_Step_Sequence_Leftsided.sce
new file mode 100755
index 000000000..e0f53b7ff
--- /dev/null
+++ b/830/CH3/EX3.2.6/Unit_Step_Sequence_Leftsided.sce
@@ -0,0 +1,10 @@
+//Graphical//
+//Example 3.2.6
+//Z transform of x[n] = u[-n]
+clear;
+clc;
+close;
+syms n z;
+x=(1)^n
+X=symsum(x*(z^(n)),n,0,%inf)
+disp(X,"ans=")
diff --git a/830/CH3/EX3.2.7/Differentaition_Property.sce b/830/CH3/EX3.2.7/Differentaition_Property.sce
new file mode 100755
index 000000000..9ace5fbf4
--- /dev/null
+++ b/830/CH3/EX3.2.7/Differentaition_Property.sce
@@ -0,0 +1,11 @@
+//Graphical//
+//Example 3.2.7
+//Z transform of x[n] = n.a^n.u[n]
+clear;
+clc;
+close;
+syms n z;
+x=(1)^n;
+X=symsum(x*(z^(-n)),n,0,%inf)
+disp(X,"ans=")
+Y = diff(X,z)
diff --git a/830/CH3/EX3.2.9/Convolution_Property.sce b/830/CH3/EX3.2.9/Convolution_Property.sce
new file mode 100755
index 000000000..00a1328e2
--- /dev/null
+++ b/830/CH3/EX3.2.9/Convolution_Property.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Example 3.2.9
+//Convolution Property Proof
+clear;
+clc;
+close;
+x1 = [1,-2,1];
+n1 = 0:length(x1)-1;
+X1 = ztransfer_new(x1,n1)
+x2 = [1,1,1,1,1,1];
+n2 = 0:length(x2)-1;
+X2 = ztransfer_new(x2,n2)
+X = X1.*X2
diff --git a/830/CH4/EX4.02.7/Reconstruction.sce b/830/CH4/EX4.02.7/Reconstruction.sce
new file mode 100755
index 000000000..706488820
--- /dev/null
+++ b/830/CH4/EX4.02.7/Reconstruction.sce
@@ -0,0 +1,41 @@
+//Graphical//
+//Example 4.02.7 Sampling a Nonbandlimited Signal
+//Plotting Discrete Time Fourier Transform of
+//Discrete Time Signal x(nT)= exp(-A*T*abs(n))
+clear;
+clc;
+close;
+// Analog Signal
+A =1; //Amplitude
+Dt = 0.005;
+t = -2:Dt:2;
+//Continuous Time Signal
+xa = exp(-A*abs(t));
+//Discrete Time Signal
+Fs =input('Enter the Sampling Frequency in Hertz');//Fs = 1Hz(or)20Hz
+Ts = 1/Fs;
+n = -5:1:5;
+nTs = n*Ts;
+x = exp(-A*abs(nTs));
+// Analog Signal reconstruction
+Dt = 0.005;
+t = -2:Dt:2;
+Xa = x *sinc_new(Fs*(ones(length(nTs),1)*t-nTs'*ones(1,length(t))));
+// check
+error = max(abs(Xa - xa))
+subplot(2,1,1);
+a =gca();
+a.x_location = "origin";
+a.y_location = "origin";
+plot(t,xa);
+xlabel('t in msec.');
+ylabel('xa(t)')
+title('Original Analog Signal')
+subplot(2,1,2);
+a =gca();
+a.x_location = "origin";
+a.y_location = "origin";
+xlabel('t in msec.');
+ylabel('xa(t)')
+title('Reconstructed Signal from x(n) using sinc function');
+plot(t,Xa);
diff --git a/830/CH4/EX4.1.2/CTFT_1.sce b/830/CH4/EX4.1.2/CTFT_1.sce
new file mode 100755
index 000000000..80f039a90
--- /dev/null
+++ b/830/CH4/EX4.1.2/CTFT_1.sce
@@ -0,0 +1,41 @@
+//Graphical//
+//Example 4.1.2 Continuous Time Fourier Transform
+//and Energy Density Function of a Square Waveform
+// x(t)= A, from -T/2 to T/2
+clear;
+clc;
+close;
+// Analog Signal
+A =1; //Amplitude
+Dt = 0.005;
+T = 4; //Time in seconds
+t = -T/2:Dt:T/2;
+for i = 1:length(t)
+ xa(i) = A;
+end
+//
+// Continuous-time Fourier Transform
+Wmax = 2*%pi*2; //Analog Frequency = 2Hz
+K = 4; k = 0:(K/800):K;
+W = k*Wmax/K;
+disp(size(xa))
+Xa=xa'*exp(-sqrt(-1)*t'*W)*Dt;
+Xa = real(Xa);
+W = [-mtlb_fliplr(W), W(2:501)]; // Omega from -Wmax to Wmax
+Xa = [mtlb_fliplr(Xa), Xa(2:501)];
+ESD = Xa^2; //Energy Density Spectrum
+subplot(3,1,1);
+plot(t,xa);
+xlabel('t in msec.');
+ylabel('xa(t)')
+title('Analog Signal')
+subplot(3,1,2);
+plot(W/(2*%pi),Xa);
+xlabel('Frequency in Hz');
+ylabel('Xa(jW)')
+title('Continuous-time Fourier Transform')
+subplot(3,1,3);
+plot(W/(2*%pi),ESD);
+xlabel('Frequency in Hz');
+ylabel('SXX')
+title('Energy Density Spectrum')
diff --git a/830/CH4/EX4.2.07/DTFT_1.sce b/830/CH4/EX4.2.07/DTFT_1.sce
new file mode 100755
index 000000000..d807596c5
--- /dev/null
+++ b/830/CH4/EX4.2.07/DTFT_1.sce
@@ -0,0 +1,42 @@
+//Graphical//
+//Example 4.2.07 Sampling a Nonbandlimited Signal
+//Plotting Discrete Time Fourier Transform of
+//Discrete Time Signal x(nT)= exp(-A*T*abs(n))
+clear;
+clc;
+close;
+// Analog Signal
+A =1; //Amplitude
+Dt = 0.005;
+t = -2:Dt:2;
+//Continuous Time Signal
+xa = exp(-A*abs(t));
+//Discrete Time Signal
+Fs =input('Enter the Sampling Frequency in Hertz');//Fs = 2Hz(or)20Hz
+Ts = 1/Fs;
+n = -5:1:5;
+x = exp(-A*abs(n*Ts));
+// Discrete-time Signal
+//Discrete-time Fourier transform
+K = 500;
+k = 0:1:K;
+w = %pi*k/K;
+X = x * exp(-sqrt(-1)*n'*w);
+X = real(X);
+w = [-mtlb_fliplr(w), w(2:K+1)]; // Omega from -w to w
+X = [mtlb_fliplr(X), X(2:K+1)];
+subplot(3,1,1);
+plot(t,xa );
+xlabel('t in msec.');
+ylabel('xa(t)')
+title('Analog Signal')
+subplot(3,1,2);
+plot2d3('gnn',n,x )
+xlabel('Discrete Time n.');
+ylabel('x(nT)')
+title('Discrete Signal');
+subplot(3,1,3);
+plot(w/(2*%pi),X );
+xlabel('Frequency in pi units');
+ylabel('X(w)')
+title('Discrete-time Fourier Transform')
diff --git a/830/CH4/EX4.2.7/CTFT_2.sce b/830/CH4/EX4.2.7/CTFT_2.sce
new file mode 100755
index 000000000..d4370d17a
--- /dev/null
+++ b/830/CH4/EX4.2.7/CTFT_2.sce
@@ -0,0 +1,38 @@
+//Graphical//
+//Example 4.2.7 Sampling a Nonbandlimited Signal
+//Plotting Continuous Time Fourier Transform of
+//Continuous Time Signal x(t)= exp(-A*abs(t))
+clear;
+clc;
+close;
+// Analog Signal
+A =1; //Amplitude
+Dt = 0.005;
+t = -2:Dt:2;
+xa = exp(-A*abs(t));
+//
+// Continuous-time Fourier Transform
+Wmax = 2*%pi*2; //Analog Frequency = 2Hz
+K = 4;
+k = 0:(K/500):K;
+W = k*Wmax/K;
+Xa = xa * exp(-sqrt(-1)*t'*W) * Dt;
+Xa = real(Xa);
+W = [-mtlb_fliplr(W), W(2:501)]; // Omega from -Wmax to Wmax
+Xa = [mtlb_fliplr(Xa), Xa(2:501)];
+subplot(2,1,1);
+a =gca();
+a.x_location = "origin";
+a.y_location = "origin";
+plot(t,xa);
+xlabel('t in msec.');
+ylabel('xa(t)')
+title('Analog Signal')
+subplot(2,1,2);
+a =gca();
+a.x_location = "origin";
+a.y_location = "origin";
+plot(W/(2*%pi),Xa);
+xlabel('Frequency in Hz');
+ylabel('Xa(jW)*1000')
+title('Continuous-time Fourier Transform')
diff --git a/830/CH4/EX4.3.4/Convolution_Property_DTFT.sce b/830/CH4/EX4.3.4/Convolution_Property_DTFT.sce
new file mode 100755
index 000000000..bce79c0b8
--- /dev/null
+++ b/830/CH4/EX4.3.4/Convolution_Property_DTFT.sce
@@ -0,0 +1,68 @@
+//Graphical//
+//Example 4.3.4
+//Convolution Property Example
+//x1(n)=x2(n)= [1,1,1]
+clear;
+clc;
+close;
+n =-1:1;
+x1 = [1,1,1];
+x2 = x1;
+//Discrete-time Fourier transform
+K = 500;
+k = 0:1:K;
+w = %pi*k/K;
+X1 = x1 * exp(-sqrt(-1)*n'*w);
+X2 = x2 * exp(-sqrt(-1)*n'*w);
+w = [-mtlb_fliplr(w), w(2:K+1)]; // Omega from -w to w
+X1 = [mtlb_fliplr(X1), X1(2:K+1)];
+X2 = [mtlb_fliplr(X2), X2(2:K+1)];
+Freq_X1 = real(X1);
+Freq_X2 = real(X2);
+X = X1.*X2;
+K1 = length(X)
+k1 = 0:1:K1;
+w1 = %pi*k1/K1;
+w1 = [-2*mtlb_fliplr(w), 2*w];
+X = [mtlb_fliplr(X), X(1:K1)];
+Freq_X = real(X);
+//Inv_X = X.*exp(sqrt(-1)*n'*w)
+x = convol(x1,x2)
+//Plotting Magitude Responses
+figure(1)
+a =gca();
+a.x_location = 'middle'
+a.y_location = 'middle'
+a.x_label
+a.y_label
+plot2d(w/%pi,Freq_X1)
+x_label =a.x_label
+y_label = a.y_label
+x_label.text =' Frequency in Radians'
+y_label.text =' X1(w)'
+//xlabel('Frequency in Radians')
+//ylabel('X1(w)')
+title('Frequency Response')
+figure(2)
+a =gca();
+a.x_location = 'middle'
+a.y_location = 'middle'
+a.x_label
+a.y_label
+plot2d(w/%pi,Freq_X2)
+x_label =a.x_label
+y_label = a.y_label
+x_label.text =' Frequency in Radians'
+y_label.text =' X2(w)'
+title('Frequency Response')
+figure(3)
+a =gca();
+a.y_location = 'middle'
+a.x_label
+a.y_label
+plot2d(w1/(2*%pi),Freq_X)
+x_label =a.x_label
+y_label = a.y_label
+x_label.text =' Frequency in Radians'
+y_label.text =' X(w)'
+title('Frequency Response')
diff --git a/830/CH4/EX4.4.2/DTFT_3.sce b/830/CH4/EX4.4.2/DTFT_3.sce
new file mode 100755
index 000000000..e398cf257
--- /dev/null
+++ b/830/CH4/EX4.4.2/DTFT_3.sce
@@ -0,0 +1,29 @@
+//Graphical//
+//Example 4.4.2
+//Frequency Response of Three point Moving Average System
+//y(n)= (1/3)[x(n+1)+x(n)+x(n-1)]
+//h(n) = [1/3,1/3,1/3]
+clear;
+clc;
+close;
+//Calculation of Impulse Response
+n =-1:1;
+h = [1/3,1/3,1/3];
+//Discrete-time Fourier transform
+K = 500;
+k = 0:1:K;
+w = %pi*k/K;
+H = h * exp(-sqrt(-1)*n'*w);
+//phasemag used to calculate phase and magnitude in dB
+[Phase_H,m] = phasemag(H);
+H = abs(H);
+subplot(2,1,1)
+plot2d(w/%pi,H)
+xlabel('Frequency in Radians')
+ylabel('abs(H)')
+title('Magnitude Response')
+subplot(2,1,2)
+plot2d(w/%pi,Phase_H)
+xlabel('Frequency in Radians')
+ylabel('<(H)')
+title('Phase Response')
diff --git a/830/CH4/EX4.4.4/DTFT_2.sce b/830/CH4/EX4.4.4/DTFT_2.sce
new file mode 100755
index 000000000..2d2bc330e
--- /dev/null
+++ b/830/CH4/EX4.4.4/DTFT_2.sce
@@ -0,0 +1,31 @@
+//Graphical//
+//Example 4.4.4
+//Frequency Response of First Order Difference Equation
+//a = 0.9 and b = 1-a
+//Impulse Response h(n) = b.(a^n).u(n)
+clear;
+clc;
+close;
+a = input('Enter the constant value of Ist order Difference Equation');
+b= 1-a;
+//Calculation of Impulse Response
+n =0:50;
+h =b*(a.^n) ;
+//Discrete-time Fourier transform
+K = 500;
+k = 0:1:K;
+w = %pi*k/K;
+H = h * exp(-sqrt(-1)*n'*w);
+//phasemag used to calculate phase and magnitude in dB
+[Phase_H,m] = phasemag(H);
+H = real(H);
+subplot(2,1,1)
+plot2d(w/%pi,H)
+xlabel('Frequency in Radians')
+ylabel('abs(H)')
+title('Magnitude Response')
+subplot(2,1,2)
+plot2d(w/%pi,Phase_H)
+xlabel('Frequency in Radians')
+ylabel('<(H)')
+title('Phase Response')
diff --git a/830/CH5/EX5.1.2/DFT1.sce b/830/CH5/EX5.1.2/DFT1.sce
new file mode 100755
index 000000000..08f5a1efd
--- /dev/null
+++ b/830/CH5/EX5.1.2/DFT1.sce
@@ -0,0 +1,35 @@
+//Graphical//
+//Example 5.1.2
+//Determination of N-point DFT
+//Plotting Magnitude and Phase spectrum
+clear;
+clc;
+close;
+L = 10; // Length of the sequence
+N = 10; // N -point DFT
+for n =0:L-1
+ x(n+1) = 1;
+end
+//Computing DFT and IDFT
+X = dft(x,-1)
+x_inv =abs(dft(X,1))
+//Computing Magnitude and Phase Spectrum
+//Using DTFT
+n = 0:L-1;
+K = 500;
+k = 0:1:K;
+w = 2*%pi*k/K;
+X_W = x * exp(-sqrt(-1)*n'*w);
+Mag_X = abs(X_W);
+//phasemag used to calculate phase and magnitude in dB
+Phase_X = atan(imag(X_W),real(X_W))
+subplot(2,1,1)
+plot2d(w,Mag_X)
+xlabel('Frequency in Radians')
+ylabel('abs(X)')
+title('Magnitude Response')
+subplot(2,1,2)
+plot2d(w,Phase_X)
+xlabel('Frequency in Radians')
+ylabel('<(X)')
+title('Phase Response')
diff --git a/830/CH5/EX5.1.3/DFT2.sce b/830/CH5/EX5.1.3/DFT2.sce
new file mode 100755
index 000000000..f95069679
--- /dev/null
+++ b/830/CH5/EX5.1.3/DFT2.sce
@@ -0,0 +1,13 @@
+//Graphical//
+//Example 5.1.3
+//Finding DFT and IDFT
+clear;
+clc;
+close;
+L = 4; // Length of the sequence
+N = 4; // N -point DFT
+x = [0,1,2,3];
+//Computing DFT
+X = dft(x,-1)
+//Computing IDFT
+x_inv = real(dft(X,1))
diff --git a/830/CH5/EX5.2.1/Circular_Conv_DFT.sce b/830/CH5/EX5.2.1/Circular_Conv_DFT.sce
new file mode 100755
index 000000000..3ed0894be
--- /dev/null
+++ b/830/CH5/EX5.2.1/Circular_Conv_DFT.sce
@@ -0,0 +1,18 @@
+//Graphical//
+//Example 5.2.1 and Example 5.2.2
+//Performing Circular COnvolution
+//Using DFT
+clear;
+clc;
+close;
+L = 4; //Length of the Sequence
+N = 4; // N -point DFT
+x1 = [2,1,2,1];
+x2 = [1,2,3,4];
+//Computing DFT
+X1 = dft(x1,-1)
+X2 = dft(x2,-1)
+//Multiplication of 2 DFTs
+X3 = X1.*X2
+//Circular Convolution Result
+x3 =abs(dft(X3,1))
diff --git a/830/CH5/EX5.3.1/Linear_Filtering_DFT.sce b/830/CH5/EX5.3.1/Linear_Filtering_DFT.sce
new file mode 100755
index 000000000..572be43de
--- /dev/null
+++ b/830/CH5/EX5.3.1/Linear_Filtering_DFT.sce
@@ -0,0 +1,39 @@
+//Graphical//
+//Example 5.3.1
+//Performing Linear Filtering (i.e) Linear Convolution
+//Using DFT
+clear;
+clc;
+close;
+h = [1,2,3]; //Impulse Response of LTI System
+x = [1,2,2,1]; //Input Response of LTI System
+N1 = length(x)
+N2 = length(h)
+disp('Length of Output Response y(n)')
+N = N1+N2-1
+//Padding zeros to Make Length of 'h' and 'x'
+//Equal to length of output response 'y'
+h1 = [h,zeros(1,8-N2)]
+x1 = [x,zeros(1,8-N1)]
+//Computing DFT
+H = dft(h1,-1)
+X = dft(x1,-1)
+//Multiplication of 2 DFTs
+Y = X.*H
+//Linear Convolution Result
+y =abs(dft(Y,1))
+for i =1:8
+ if(abs(H(i))<0.0001)
+ H(i) =0;
+ end
+ if(abs(X(i))<0.0001)
+ X(i) =0;
+ end
+ if(abs(y(i))<0.0001)
+ y(i) =0;
+ end
+end
+disp(X,'X=')
+disp(H,'H=')
+disp(y,'Output response using Convolution function')
+y = convol(x,h)
diff --git a/830/CH5/EX5.4.1/Zero_Padding.sce b/830/CH5/EX5.4.1/Zero_Padding.sce
new file mode 100755
index 000000000..60b505f9d
--- /dev/null
+++ b/830/CH5/EX5.4.1/Zero_Padding.sce
@@ -0,0 +1,25 @@
+//Graphical//
+//Example 5.4.1
+//Effect of Zero Padding
+clear;
+clc;
+close;
+L = 100; // Length of the sequence
+N = 200; // N -point DFT
+n = 0:L-1;
+x = (0.95).^n;
+//Padding zeros to find N = 200 point DFT
+x_padd = [x, zeros(1,N-L)];
+//Computing DFT
+X = dft(x,-1);
+X_padd = dft(x_padd,-1);
+subplot(2,1,1)
+plot2d(X)
+xlabel('K')
+ylabel('X(k)')
+title('For L =100 and N =100')
+subplot(2,1,2)
+plot2d(X_padd)
+xlabel('K')
+ylabel('X(k) zero padded')
+title('For L =100 and N =200')
diff --git a/830/CH6/EX6.11/FFT_Exercise2.sce b/830/CH6/EX6.11/FFT_Exercise2.sce
new file mode 100755
index 000000000..2c91dc443
--- /dev/null
+++ b/830/CH6/EX6.11/FFT_Exercise2.sce
@@ -0,0 +1,11 @@
+//Graphical//
+//Exercise 6.11
+//Program to Calculate DFT using DIF-FFT algorithm
+//x[n]= [1/2,1/2,1/2,1/2,0,0,0,0]
+clear;
+clc;
+close;
+x = [1/2,1/2,1/2,1/2,0,0,0,0];
+X = fft(x,-1)
+//Inverse FFT
+x_inv = real(fft(X,1))
diff --git a/830/CH6/EX6.4.1/SNR_DFT.sce b/830/CH6/EX6.4.1/SNR_DFT.sce
new file mode 100755
index 000000000..e48aba672
--- /dev/null
+++ b/830/CH6/EX6.4.1/SNR_DFT.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Example 6.4.1
+//Program to Calculate No.of bits required for given
+//Signal to Quantization Noise Ratio
+//in computing DFT
+clear;
+clc;
+close;
+N = 1024;
+SQNR = 30; //SQNR = 30 dB
+v = log2(N); //number of stages
+b = (log2(10^(SQNR/10))+2*v)/2;
+b = ceil(b)
+disp(b,'The number of bits required rounded to:')
diff --git a/830/CH6/EX6.4.2/SNR_FFT_ALGORITHM.sce b/830/CH6/EX6.4.2/SNR_FFT_ALGORITHM.sce
new file mode 100755
index 000000000..2fbdf5563
--- /dev/null
+++ b/830/CH6/EX6.4.2/SNR_FFT_ALGORITHM.sce
@@ -0,0 +1,14 @@
+//Graphical//
+//Example 6.4.2
+//Program to Calculate No.of bits required for given
+//Signal to Quantization Noise Ratio
+//in FFT algorithm
+clear;
+clc;
+close;
+N = 1024;
+SQNR = 30; //SQNR = 30 dB
+v = log2(N); //number of stages
+b = (log2(10^(SQNR/10))+v+1)/2;
+b = ceil(b)
+disp(b,'The number of bits required rounded to:')
diff --git a/830/CH6/EX6.8/FFT_Exercise1.sce b/830/CH6/EX6.8/FFT_Exercise1.sce
new file mode 100755
index 000000000..54ed73fe4
--- /dev/null
+++ b/830/CH6/EX6.8/FFT_Exercise1.sce
@@ -0,0 +1,11 @@
+//Graphical//
+//Exercise 6.8
+//Program to Calculate DFT using DIF-FFT algorithm
+//x[n]= 1, 0<=n<=7
+clear;
+clc;
+close;
+x = [1,1,1,1,1,1,1,1];
+X = fft(x,-1)
+//Inverse FFT
+x_inv = real(fft(X,1))
diff --git a/830/CH7/EX6.4.17/SQNR_IN_FFT_ALGORITHM.sce b/830/CH7/EX6.4.17/SQNR_IN_FFT_ALGORITHM.sce
new file mode 100755
index 000000000..6b4b631b0
--- /dev/null
+++ b/830/CH7/EX6.4.17/SQNR_IN_FFT_ALGORITHM.sce
@@ -0,0 +1,20 @@
+//Graphical//
+//Equation 6.4.17
+//page492
+//Program to Calculate Signal to Quantization Noise Ratio
+//in FFT algorithm
+clear;
+clc;
+close;
+N = input('Enter the N point FFT value');
+b = log2(N)
+Quantization_Noise = (2/3)*(2^(-2*b))
+Signal_Power = (1/(3*N))
+SQNR = Signal_Power/Quantization_Noise
+//RESULT
+//Enter the N point FFT value 1024
+// b = 10.
+// Quantization_Noise = 0.0000006
+// Signal_Power = 0.0003255
+// SQNR = 512.
+//-->10*log10(SQNR) = 27.0927
diff --git a/830/CH7/EX7.6.3/COEFFICIENT_QUANTIZATION_NOISE.sce b/830/CH7/EX7.6.3/COEFFICIENT_QUANTIZATION_NOISE.sce
new file mode 100755
index 000000000..58cba81dc
--- /dev/null
+++ b/830/CH7/EX7.6.3/COEFFICIENT_QUANTIZATION_NOISE.sce
@@ -0,0 +1,11 @@
+//Graphical//
+//Example 7.6.3
+//Program to Calculate Quantization Noise in FIR Filter
+//For M = 32 and No.of bits = 12
+clear;
+clc;
+close;
+b = input('Enter the number of bits');
+M = input('Enter the FIR filter length');
+disp('Coefficient Quantization Error in FIR Filter')
+Sigma_e_square = (2^(-2*(b+1)))*M/12
diff --git a/830/CH7/EX7.7.01/Roundoffnoise_Cascade_Realization.sce b/830/CH7/EX7.7.01/Roundoffnoise_Cascade_Realization.sce
new file mode 100755
index 000000000..2c7234d93
--- /dev/null
+++ b/830/CH7/EX7.7.01/Roundoffnoise_Cascade_Realization.sce
@@ -0,0 +1,25 @@
+//Graphical//
+//Example 7.7.01
+//Determination of Variance of round-off noise
+//at the output of cascade realization
+//H1(Z) = 1/(1-(1/2)z-1)
+//H2(Z) = 1/(1-(1/4)z-1)
+//H(Z) = (2/(1-(1/2)z-1))-(1/(1-(1/4)z-1))
+clear;
+clc;
+close;
+a1 = (1/2); //pole of first system in cascade connection
+a2 = (1/4); //ploe of second system in cascade connection
+sigma_e = 1; //quantization noise variance
+//Noise variance of H1(Z)
+sigma_2 = (1/(1-a2^2))*sigma_e^2//noise variance of second system
+//Noise variance of H2(Z)
+sigma_1 = 1/(1-a1^2)*sigma_e^2//noise variance of first system
+//Nosie variance of H(Z)
+sigma = (((2^2)/(1-a1^2))-((2^2)/(1-a1*a2))+(1/(1-a2^2)))*sigma_e^2
+noise_variance = sigma+sigma_2 //Total noise variance
+//Result
+//sigma_2 = 1.0666667
+//sigma_1 = 1.3333333
+//sigma = 1.8285714
+//noise_variance = 2.8952381
diff --git a/830/CH7/EX7.7.1/DEAD_BAND.sce b/830/CH7/EX7.7.1/DEAD_BAND.sce
new file mode 100755
index 000000000..d27c97e7f
--- /dev/null
+++ b/830/CH7/EX7.7.1/DEAD_BAND.sce
@@ -0,0 +1,15 @@
+//Graphical//
+//Equation 7.7.1
+//Program to find Dead band of First order Recursive System
+//y(n) = a y(n-1)+x(n); a = (1/2) and a = (3/4)
+clear;
+clc;
+close;
+a = input('Enter the constant value of first Recursive system');
+b = 4; //No. of bits used to represent
+Dead_Band = (2^-b)*[(1/2)*(1/(1-a)),-(1/2)*(1/(1-a))]
+//Result
+//For a = (1/2)
+//Dead Band = [0.0625 - 0.0625]
+//For a = (3/4)
+//Dead Band = [0.125 - 0.125]
diff --git a/830/CH8/EX08.3.6/IIR_ButterworthFilter_Parameters_1.sce b/830/CH8/EX08.3.6/IIR_ButterworthFilter_Parameters_1.sce
new file mode 100755
index 000000000..2076baabd
--- /dev/null
+++ b/830/CH8/EX08.3.6/IIR_ButterworthFilter_Parameters_1.sce
@@ -0,0 +1,30 @@
+//Graphical//
+//Example 08.3.6
+// To Design an Analog Butterworth Filter
+//For the given cutoff frequency Wc = 500 Hz
+clear;
+clc;
+close;
+omegap = 500;
+omegas = 1000;
+delta1_in_dB = -3;
+delta2_in_dB = -40;
+delta1 = 10^(delta1_in_dB/20)
+delta2 = 10^(delta2_in_dB/20)
+//Calculation of Filter Order
+N = log10((1/(delta2^2))-1)/(2*log10(omegas/omegap))
+N = ceil(N)
+omegac = omegap;
+//Poles and Gain Calculation
+[pols,gain]=zpbutt(N,omegac);
+//Magnitude Response of Analog IIR Butterworth Filter
+h=buttmag(N,omegac,1:1000);
+//Magnitude in dB
+mag=20*log10(h);
+plot2d((1:1000),mag,[0,-180,1000,20]);
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(5)
+xtitle('Magnitude Response of Butterworth LPF Filter Cutoff frequency = 500 Hz','Analog frequency in Hz--->','Magnitude in dB -->');
diff --git a/830/CH8/EX1.08/FIR_BSF_1_08.sce b/830/CH8/EX1.08/FIR_BSF_1_08.sce
new file mode 100755
index 000000000..22d4c1126
--- /dev/null
+++ b/830/CH8/EX1.08/FIR_BSF_1_08.sce
@@ -0,0 +1,43 @@
+//Graphical//
+//PROGRAM TO DESIGN AND OBTAIN THE FREQUENCY RESPONSE OF FIR FILTER
+//Band Stop FILTER (or)Band Reject Filter
+clear;
+clc;
+close;
+M = 11 //Filter length = 11
+Wc = [%pi/4,3*%pi/4]; //Digital Cutoff frequency
+Wc2 = Wc(2)
+Wc1 = Wc(1)
+Tuo = (M-1)/2 //Center Value
+hd = zeros(1,M);
+W = zeros(1,M);
+for n = 1:11
+ if (n == Tuo+1)
+ hd(n) = 1-((Wc2-Wc1)/%pi);
+ else hd(n)=(sin(%pi*((n-1)-Tuo))-sin(Wc2*((n-1)-Tuo))+sin(Wc1*((n-1)-Tuo)))/(((n-1)-Tuo)*%pi);
+ end
+ if(abs(hd(n))<(0.00001))
+ hd(n)=0;
+ end
+end
+hd
+//Rectangular Window
+for n = 1:M
+ W(n) = 1;
+end
+//Windowing Fitler Coefficients
+h = hd.*W;
+disp('Filter Coefficients are')
+h;
+[hzm,fr]=frmag(h,256);
+hzm_dB = 20*log10(hzm)./max(hzm);
+subplot(2,1,1)
+plot(2*fr,hzm)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude');
+title('Frequency Response 0f FIR BPF using Rectangular window M=11')
+subplot(2,1,2)
+plot(2*fr,hzm_dB)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude in dB');
+title('Frequency Response 0f FIR BPF using Rectangular window M=11')
diff --git a/830/CH8/EX1.8/FIR_BPF_1_8.sce b/830/CH8/EX1.8/FIR_BPF_1_8.sce
new file mode 100755
index 000000000..44e9dd49b
--- /dev/null
+++ b/830/CH8/EX1.8/FIR_BPF_1_8.sce
@@ -0,0 +1,45 @@
+//Graphical//
+//PROGRAM TO DESIGN AND OBTAIN THE FREQUENCY RESPONSE OF FIR FILTER
+//Band PASS FILTER
+clear;
+clc;
+close;
+M = 11 //Filter length = 11
+Wc = [%pi/4,3*%pi/4]; //Digital Cutoff frequency
+Wc2 = Wc(2)
+Wc1 = Wc(1)
+Tuo = (M-1)/2 //Center Value
+hd = zeros(1,M);
+W = zeros(1,M);
+for n = 1:11
+ if (n == Tuo+1)
+ hd(n) = (Wc2-Wc1)/%pi;
+ else
+ n
+ hd(n) = (sin(Wc2*((n-1)-Tuo)) -sin(Wc1*((n-1)-Tuo)))/(((n-1)-Tuo)*%pi);
+ end
+ if(abs(hd(n))<(0.00001))
+ hd(n)=0;
+ end
+end
+hd;
+//Rectangular Window
+for n = 1:M
+ W(n) = 1;
+end
+//Windowing Fitler Coefficients
+h = hd.*W;
+disp('Filter Coefficients are')
+h;
+[hzm,fr]=frmag(h,256);
+hzm_dB = 20*log10(hzm)./max(hzm);
+subplot(2,1,1)
+plot(2*fr,hzm)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude');
+title('Frequency Response 0f FIR BPF using Rectangular window M=11')
+subplot(2,1,2)
+plot(2*fr,hzm_dB)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude in dB');
+title('Frequency Response 0f FIR BPF using Rectangular window M=11')
diff --git a/830/CH8/EX2.8/FIR_HPF_2_8.sce b/830/CH8/EX2.8/FIR_HPF_2_8.sce
new file mode 100755
index 000000000..4be73da66
--- /dev/null
+++ b/830/CH8/EX2.8/FIR_HPF_2_8.sce
@@ -0,0 +1,36 @@
+//Graphical//
+//PROGRAM TO DESIGN AND OBTAIN THE FREQUENCY RESPONSE OF FIR FILTER
+//HIGH PASS FILTER
+clear;
+clc;
+close;
+M = 61 //Filter length = 61
+Wc = %pi/5; //Digital Cutoff frequency
+Tuo = (M-1)/2 //Center Value
+for n = 1:M
+ if (n == Tuo+1)
+ hd(n) = 1-Wc/%pi;
+ else
+ hd(n) = (sin(%pi*((n-1)-Tuo)) -sin(Wc*((n-1)-Tuo)))/(((n-1)-Tuo)*%pi);
+ end
+end
+//Rectangular Window
+for n = 1:M
+ W(n) = 1;
+end
+//Windowing Fitler Coefficients
+h = hd.*W;
+disp('Filter Coefficients are')
+h;
+[hzm,fr]=frmag(h,256);
+hzm_dB = 20*log10(hzm)./max(hzm);
+subplot(2,1,1)
+plot(2*fr,hzm)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude');
+title('Frequency Response 0f FIR HPF using Rectangular window M=61')
+subplot(2,1,2)
+plot(2*fr,hzm_dB)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude in dB');
+title('Frequency Response 0f FIR HPF using Rectangular window M=61')
diff --git a/830/CH8/EX8.03.06/IIR_ButterworthFilter_Parameters_1.sce b/830/CH8/EX8.03.06/IIR_ButterworthFilter_Parameters_1.sce
new file mode 100755
index 000000000..a71e8f4a4
--- /dev/null
+++ b/830/CH8/EX8.03.06/IIR_ButterworthFilter_Parameters_1.sce
@@ -0,0 +1,30 @@
+//Graphical//
+//Example 8.03.06
+// To Design an Analog Butterworth Filter
+//For the given cutoff frequency Wc = 500 Hz
+clear;
+clc;
+close;
+omegap = 500;
+omegas = 1000;
+delta1_in_dB = -3;
+delta2_in_dB = -40;
+delta1 = 10^(delta1_in_dB/20)
+delta2 = 10^(delta2_in_dB/20)
+//Calculation of Filter Order
+N = log10((1/(delta2^2))-1)/(2*log10(omegas/omegap))
+N = ceil(N)
+omegac = omegap;
+//Poles and Gain Calculation
+[pols,gain]=zpbutt(N,omegac);
+//Magnitude Response of Analog IIR Butterworth Filter
+h=buttmag(N,omegac,1:1000);
+//Magnitude in dB
+mag=20*log10(h);
+plot2d((1:1000),mag,[0,-180,1000,20]);
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(5)
+xtitle('Magnitude Response of Butterworth LPF Filter Cutoff frequency = 500 Hz','Analog frequency in Hz--->','Magnitude in dB -->');
diff --git a/830/CH8/EX8.03.5/IIR_Butter_LPF.sce b/830/CH8/EX8.03.5/IIR_Butter_LPF.sce
new file mode 100755
index 000000000..05973b6b5
--- /dev/null
+++ b/830/CH8/EX8.03.5/IIR_Butter_LPF.sce
@@ -0,0 +1,22 @@
+//Graphical//
+//Example 8.03.5
+//First Order Butterworth Filter
+//Low Pass Filter
+clear;
+clc;
+close;
+s = poly(0,'s');
+Omegac = 0.2*%pi;
+H = Omegac/(s+Omegac);
+T =1;//Sampling period T = 1 Second
+z = poly(0,'z');
+Hz = horner(H,(2/T)*((z-1)/(z+1)))
+HW =frmag(Hz(2),Hz(3),512);
+W = 0:%pi/511:%pi;
+plot(W/%pi,HW)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of Single pole LPF Filter Cutoff frequency = 0.2*pi','Digital Frequency--->','Magnitude');
diff --git a/830/CH8/EX8.03.6/IIR_ButterworthFilter_LPF.sce b/830/CH8/EX8.03.6/IIR_ButterworthFilter_LPF.sce
new file mode 100755
index 000000000..31ed95a00
--- /dev/null
+++ b/830/CH8/EX8.03.6/IIR_ButterworthFilter_LPF.sce
@@ -0,0 +1,30 @@
+//Graphical//
+//Example 8.03.6
+// To Design an Analog Low Pass IIR Butterworth Filter
+//For the given cutoff frequency Wc = 500 Hz
+clear;
+clc;
+close;
+omegap = 500;
+omegas = 1000;
+delta1_in_dB = -3;
+delta2_in_dB = -40;
+delta1 = 10^(delta1_in_dB/20)
+delta2 = 10^(delta2_in_dB/20)
+//Calculation of Filter Order
+N = log10((1/(delta2^2))-1)/(2*log10(omegas/omegap))
+N = ceil(N)
+omegac = omegap;
+//Poles and Gain Calculation
+[pols,gain]=zpbutt(N,omegac);
+//Magnitude Response of Analog IIR Butterworth Filter
+h=buttmag(N,omegac,1:1000);
+//Magnitude in dB
+mag=20*log10(h);
+plot2d((1:1000),mag,[0,-180,1000,20]);
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(5)
+xtitle('Magnitude Response of Butterworth LPF Filter Cutoff frequency = 500 Hz','Analog frequency in Hz--->','Magnitude in dB -->');
diff --git a/830/CH8/EX8.10/FIR_LPF_1.sce b/830/CH8/EX8.10/FIR_LPF_1.sce
new file mode 100755
index 000000000..a9c2bade0
--- /dev/null
+++ b/830/CH8/EX8.10/FIR_LPF_1.sce
@@ -0,0 +1,37 @@
+//Graphical//
+//Figure 8.9 and 8.10
+//PROGRAM TO DESIGN AND OBTAIN THE FREQUENCY RESPONSE OF FIR FILTER
+//LOW PASS FILTER
+clear;
+clc;
+close;
+M = 61 //Filter length = 61
+Wc = %pi/5; //Digital Cutoff frequency
+Tuo = (M-1)/2 //Center Value
+for n = 1:M
+ if (n == Tuo+1)
+ hd(n) = Wc/%pi;
+ else
+ hd(n) = sin(Wc*((n-1)-Tuo))/(((n-1)-Tuo)*%pi);
+ end
+end
+//Rectangular Window
+for n = 1:M
+ W(n) = 1;
+end
+//Windowing Fitler Coefficients
+h = hd.*W;
+disp('Filter Coefficients are')
+h;
+[hzm,fr]=frmag(h,256);
+hzm_dB = 20*log10(hzm)./max(hzm);
+subplot(2,1,1)
+plot(fr,hzm)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude');
+title('Frequency Response 0f FIR LPF using Rectangular window M=61')
+subplot(2,1,2)
+plot(fr,hzm_dB)
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude in dB');
+title('Frequency Response 0f FIR LPF using Rectangular window M=61')
diff --git a/830/CH8/EX8.2.1/Freq_Sampling_Technique1.sce b/830/CH8/EX8.2.1/Freq_Sampling_Technique1.sce
new file mode 100755
index 000000000..297c12071
--- /dev/null
+++ b/830/CH8/EX8.2.1/Freq_Sampling_Technique1.sce
@@ -0,0 +1,38 @@
+//Graphical//
+//Example 8.2.1
+//Design of FIR Filter using Frequecny Sampling Technique
+//Low Pass Filter Design
+clear;
+clc;
+close;
+M =15;
+Hr = [1,1,1,1,0.4,0,0,0];
+for k =1:length(Hr)
+ G(k)=((-1)^(k-1))*Hr(k);
+end
+h = zeros(1,M);
+U = (M-1)/2
+for n = 1:M
+ h1 = 0;
+ for k = 2:U+1
+ h1 =G(k)*cos((2*%pi/M)*(k-1)*((n-1)+(1/2)))+h1;
+ end
+ h(n) = (1/M)* (G(1)+2*h1);
+end
+h
+[hzm,fr]=frmag(h,256);
+hzm_dB = 20*log10(hzm)./max(hzm);
+figure
+plot(2*fr,hzm)
+a=gca();
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude');
+title('Frequency Response 0f FIR LPF using Frequency Sampling Technique with M = 15 with Cutoff Frequency = 0.466')
+xgrid(2)
+figure
+plot(2*fr,hzm_dB)
+a=gca();
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude in dB');
+title('Frequency Response 0f FIR LPF using Frequency Sampling Technique with M = 15 with Cutoff Frequency = 0.466')
+xgrid(2)
diff --git a/830/CH8/EX8.2.2/Freq_Sampling_Technique2.sce b/830/CH8/EX8.2.2/Freq_Sampling_Technique2.sce
new file mode 100755
index 000000000..23ddf28e0
--- /dev/null
+++ b/830/CH8/EX8.2.2/Freq_Sampling_Technique2.sce
@@ -0,0 +1,39 @@
+//Graphical//
+//Example 8.2.2
+//Design of FIR Filter using Frequecny Sampling Technique
+//Low Pass Filter Design
+clear;
+clc;
+close;
+M =32;
+T1 = 0.3789795; //for alpha = 0 (Type I)
+Hr = [1,1,1,1,1,1,T1,0,0,0,0,0,0,0,0,0];
+for k =1:length(Hr)
+ G(k)=((-1)^(k-1))*Hr(k);
+end
+h = zeros(1,M);
+U = (M-1)/2
+for n = 1:M
+ h1 = 0;
+ for k = 2:U+1
+ h1 =G(k)*cos((2*%pi/M)*(k-1)*((n-1)+(1/2)))+h1;
+ end
+ h(n) = (1/M)* (G(1)+2*h1);
+end
+h
+[hzm,fr]=frmag(h,256);
+hzm_dB = 20*log10(hzm)./max(hzm);
+figure
+plot(2*fr,hzm)
+a=gca();
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude');
+title('Frequency Response 0f FIR LPF using Frequency Sampling Technique with M = 15 with Cutoff Frequency = 0.466')
+xgrid(2)
+figure
+plot(2*fr,hzm_dB)
+a=gca();
+xlabel('Normalized Digital Frequency W');
+ylabel('Magnitude in dB');
+title('Frequency Response 0f FIR LPF using Frequency Sampling Technique with M = 15 with Cutoff Frequency = 0.466')
+xgrid(2)
diff --git a/830/CH8/EX8.2.3/FIR_LPF.sce b/830/CH8/EX8.2.3/FIR_LPF.sce
new file mode 100755
index 000000000..e4df90e79
--- /dev/null
+++ b/830/CH8/EX8.2.3/FIR_LPF.sce
@@ -0,0 +1,25 @@
+//Graphical//
+//Example 8.2.3
+//Low Pass FIlter of length M = 61
+//Pass band Edge frequency fp = 0.1 and a Stop edge frequency fs = 0.15
+// Choose the number of cosine functions and create a dense grid
+// in [0,0.1) and [0.15,0.5)
+//magnitude for pass band = 1 & stop band = 0 (i.e) [1 0]
+//Weighting function =[1 1]
+clear;
+clc;
+close;
+hn=eqfir(61,[0 .1;.15 .5],[1 0],[1 1]);
+[hm,fr]=frmag(hn,256);
+disp('The Filter Coefficients are:')
+hn
+figure
+plot(fr,hm)
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
+figure
+plot(.5*(0:255)/256,20*log10(frmag(hn,256)));
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude in dB');
+title('Frequency Response of FIR LPF using REMEZ algorithm M=61')
diff --git a/830/CH8/EX8.2.4/FIR_BPF.sce b/830/CH8/EX8.2.4/FIR_BPF.sce
new file mode 100755
index 000000000..4e07fc19b
--- /dev/null
+++ b/830/CH8/EX8.2.4/FIR_BPF.sce
@@ -0,0 +1,31 @@
+//Graphical//
+//Example 8.2.4
+//Band Pass FIlter of length M = 32
+//Lower Cutoff frequency fp = 0.2 and Upper Cutoff frequency fs = 0.35
+// Choose the number of cosine functions and create a dense grid
+// in [0,0.1) and [0.2,0.35] and [0.425,0.5]
+//magnitude for pass band = 1 & stop band = 0 (i.e) [0 1 0]
+//Weighting function =[10 1 10]
+clear;
+clc;
+close;
+hn = 0;
+hm = 0;
+hn=eqfir(32,[0 .1;.2 .35;.425 .5],[0 1 0],[10 1 10]);
+[hm,fr]=frmag(hn,256);
+disp('The Filter Coefficients are:')
+hn
+figure
+plot(fr,hm)
+a =gca();
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR BPF using REMEZ algorithm M=32')
+xgrid(2)
+figure
+plot(.5*(0:255)/256,20*log10(frmag(hn,256)));
+a = gca();
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude in dB');
+title('Frequency Response of FIR BPF using REMEZ algorithm M=32')
+xgrid(2)
diff --git a/830/CH8/EX8.2.5/FIR_Differentiator.sce b/830/CH8/EX8.2.5/FIR_Differentiator.sce
new file mode 100755
index 000000000..be8f92658
--- /dev/null
+++ b/830/CH8/EX8.2.5/FIR_Differentiator.sce
@@ -0,0 +1,26 @@
+//Graphical//
+//Example 8.2.5
+//Linear Phase FIR Differentiator of length M = 60
+//Pass Band Edge frequency fp = 0.1
+clear;
+clc;
+close;
+M =60;
+tuo = (M/2)-1;
+Wc = 0.1;
+h = zeros(1,M);
+for n = 1:M
+ if n ~= M/2
+ h(n) =cos((n-1-tuo)*Wc)/(n-1-tuo);
+ end
+end
+[hm,fr]=frmag(h,1024);
+disp('The Filter Coefficients are:')
+h
+figure
+plot(fr,hm/max(hm))
+a =gca();
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR Differentiator for M=60')
+xgrid(2)
diff --git a/830/CH8/EX8.2.6/Hilbert_Transformer.sce b/830/CH8/EX8.2.6/Hilbert_Transformer.sce
new file mode 100755
index 000000000..4e0d14d55
--- /dev/null
+++ b/830/CH8/EX8.2.6/Hilbert_Transformer.sce
@@ -0,0 +1,47 @@
+//Graphical//
+//Example 8.2.6
+// Plotting Hibert Transformer of Length M = 31
+//Default Window Rectangular Window
+//Chebyshev approx default parameter = [0 0]
+clear;
+clc;
+close;
+M =31;//Hibert Transformer Length = 31
+tuo = (M-1)/2;
+Wc = %pi;
+h = zeros(1,M);
+for n = 1:M
+ if n ~= ((M-1)/2)+1
+ h(n) =(2/%pi)*(sin((n-1-tuo)*Wc/2)^2)/(n-1-tuo);
+ end
+end
+disp('The Hilbert Coefficients are:')
+h
+Rec_Window = ones(1,M);//Rectangular Window generation
+h_Rec = h.*Rec_Window;//Windowing With Rectangular window
+//Hamming Window geneartion
+for n=1:M
+ hamm_Window(n) = 0.54-0.46*cos(2*%pi*(n-1)/(M-1));
+end
+h_hamm = h.*hamm_Window';//Windowing With hamming window;
+//Hilbert Transformer using Rectangular window
+[hm_Rec,fr]=frmag(h_Rec,1024);
+hm_Rec_dB = 20*log10(hm_Rec);
+figure
+plot(fr,hm_Rec_dB)
+a =gca();
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR Hibert Transformer using Rectangular window for M=31')
+xgrid(2)
+//Hilbert Transformer using Hamming window
+[hm_hamm,fr]=frmag(h_hamm,1024);
+disp('The Hilbert Coefficients are:')
+hm_hamm_dB = 20*log10(hm_hamm);
+figure
+plot(fr,hm_hamm_dB)
+a =gca();
+xlabel('Normalized Digital Frequency fr');
+ylabel('Magnitude');
+title('Frequency Response of FIR Hibert Transformer using hamming window for M=31')
+xgrid(2)
diff --git a/830/CH8/EX8.3.05/IIR_Butter_Transformation_HPF.sce b/830/CH8/EX8.3.05/IIR_Butter_Transformation_HPF.sce
new file mode 100755
index 000000000..3bc739635
--- /dev/null
+++ b/830/CH8/EX8.3.05/IIR_Butter_Transformation_HPF.sce
@@ -0,0 +1,25 @@
+//Graphical//
+//Example 8.3.05
+//First Order Butterworth Filter
+//High Pass Filter
+//Table 8.13: Using Digital Filter Transformation
+clear;
+clc;
+close;
+s = poly(0,'s');
+Omegac = 0.2*%pi;
+H = Omegac/(s+Omegac);
+T =1;//Sampling period T = 1 Second
+z = poly(0,'z');
+Hz_LPF = horner(H,(2/T)*((z-1)/(z+1)));
+alpha = -(cos((Omegac+Omegac)/2))/(cos((Omegac-Omegac)/2));
+HZ_HPF=horner(H_LPF,-(z+alpha)/(1+alpha*z))
+HW =frmag(HZ_HPF(2),HZ_HPF(3),512);
+W = 0:%pi/511:%pi;
+plot(W/%pi,HW)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of Single pole HPF Filter Cutoff frequency = 0.2*pi','Digital Frequency--->','Magnitude');
diff --git a/830/CH8/EX8.3.06/IIR_Butter_LPF_To_HPF.sce b/830/CH8/EX8.3.06/IIR_Butter_LPF_To_HPF.sce
new file mode 100755
index 000000000..e7901196e
--- /dev/null
+++ b/830/CH8/EX8.3.06/IIR_Butter_LPF_To_HPF.sce
@@ -0,0 +1,92 @@
+//Graphical//
+//Example 8.3.06
+// To Convert LPF to Analog [1].High Pass [2].Band Pass [3].Band Stop IIR Butterworth Filter
+//Using Analog Filter Transformations:Refer Table:8.12
+//For the given cutoff frequency Wc = 500 Hz
+clear;
+clc;
+close;
+omegap = 500;
+omegas = 1000;
+delta1_in_dB = -3;
+delta2_in_dB = -40;
+delta1 = 10^(delta1_in_dB/20)
+delta2 = 10^(delta2_in_dB/20)
+//Calculation of Filter Order
+N = log10((1/(delta2^2))-1)/(2*log10(omegas/omegap))
+N = ceil(N)
+omegac = omegap;
+//Poles and Gain Calculation
+[pols,gain]=zpbutt(N,omegac);
+N =1;
+//
+omega_LPF = omegap; //Analog LPF Cutoff frequency
+omega_HPF = omega_LPF; //Analog HPF Cutoff frequency
+omega2 = 600; //Upper Cutoff frequency
+omega1 = 300; //Lower Cutoff Frequency
+omega0 = (omega2*omega1);
+BW = omega2 - omega1; //Bandwidth
+disp('Analog LPF Transfer function')
+[hs,pols,zers,gain] = analpf(N,'butt',[0,0],omega_LPF)
+hs_LPF = hs;
+hs_LPF(2) = hs_LPF(2)/500;
+hs_LPF(3)= hs_LPF(3)/500;
+s =poly(0,'s');
+disp('Analog HPF Transfer function')
+h_HPF = horner(hs_LPF,omega_LPF*omega_HPF/s)
+disp('Analog BPF Transfer function')
+num = (s^2)+omega0
+den = BW*s
+h_BPF = horner(hs_LPF,omega_LPF*(num/den))
+disp('Analog BSF Transfer function')
+num = s*BW
+den = (s^2)+omega0
+h_BSF = horner(hs_LPF,omega_LPF*(num/den))
+//Plotting Low Pass Filter Frequency Response
+figure
+fr=0:.1:1000;
+hf=freq(hs_LPF(2),hs_LPF(3),%i*fr);
+hm=abs(hf);
+plot(fr,hm)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of LPF Filter Cutoff frequency = 500Hz','Analog Frequency--->','Magnitude');
+//Plotting High Pass Filter Frequency Response
+figure
+fr=0:.1:1000;
+hf_HPF=freq(h_HPF(2),h_HPF(3),%i*fr);
+hm_HPF=abs(hf_HPF);
+plot(fr,hm_HPF)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of HPF Filter Cutoff frequency = 500Hz','Analog Frequency--->','Magnitude');
+//Plotting Band Pass Filter Frequency Response
+figure
+fr=0:.1:1000;
+hf_BPF=freq(h_BPF(2),h_BPF(3),%i*fr);
+hm_BPF=abs(hf_BPF);
+plot(fr,hm_BPF)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of BPF Filter Upper Cutoff frequency = 600Hz & Lower Cutoff frequency = 300Hz','Analog Frequency--->','Magnitude');
+//Plotting Band Stop Filter Frequency Response
+figure
+fr=0:.1:1000;
+hf_BSF=freq(h_BSF(2),h_BSF(3),%i*fr);
+hm=abs(hf_BSF);
+plot(fr,hf_BSF)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of BSF Filter Upper Cutoff frequency = 600Hz & Lower Cutoff frequency = 300Hz','Analog Frequency--->','Magnitude');
diff --git a/830/CH8/EX8.3.2/Backward_Difference.sce b/830/CH8/EX8.3.2/Backward_Difference.sce
new file mode 100755
index 000000000..0f89d5bd5
--- /dev/null
+++ b/830/CH8/EX8.3.2/Backward_Difference.sce
@@ -0,0 +1,12 @@
+//Graphical//
+//Example 8.3.2
+//mapping = (z-(z^-1))/T
+//To convert analog filter into digital filter
+clear;
+clc;
+close;
+s = poly(0,'s');
+H = 1/((s+0.1)^2+9)
+T =1;//Sampling period T = 1 Second
+z = poly(0,'z');
+Hz = horner(H,(1/T)*(z-(z^-1)))
diff --git a/830/CH8/EX8.3.4/Bilinear_Transformation.sce b/830/CH8/EX8.3.4/Bilinear_Transformation.sce
new file mode 100755
index 000000000..0f9b136ab
--- /dev/null
+++ b/830/CH8/EX8.3.4/Bilinear_Transformation.sce
@@ -0,0 +1,15 @@
+//Graphical//
+//Example 8.3.4
+//Bilinear Transformation
+//To convert analog filter into digital filter
+clear;
+clc;
+close;
+s = poly(0,'s');
+H = (s+0.1)/((s+0.1)^2+16);
+Omega_Analog = 4;
+Omega_Digital = %pi/2;
+//Finding Sampling Period
+T = (2/Omega_Analog)*(tan(Omega_Digital/2))
+z = poly(0,'z');
+Hz = horner(H,(2/T)*((z-1)/(z+1)))
diff --git a/830/CH8/EX8.3.5/Single_pole_filter.sce b/830/CH8/EX8.3.5/Single_pole_filter.sce
new file mode 100755
index 000000000..35614d03b
--- /dev/null
+++ b/830/CH8/EX8.3.5/Single_pole_filter.sce
@@ -0,0 +1,50 @@
+//Graphical//
+//Example 8.3.5 Sigle pole analog filter
+//Bilinear Transformation
+//To convert analog filter into digital filter
+clear;
+clc;
+close;
+s = poly(0,'s');
+Omegac = 0.2*%pi;
+H = Omegac/(s+Omegac);
+T =1;//Sampling period T = 1 Second
+z = poly(0,'z');
+Hz = horner(H,(2/T)*((z-1)/(z+1)))
+disp(Hz,'Hz =')
+HW =frmag(Hz(2),Hz(3),512);
+W = 0:%pi/511:%pi;
+plot(W/%pi,HW)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of Single pole LPF Filter Cutoff frequency = 0.2*pi','Digital Frequency--->','Magnitude');
+//Result
+//Hz =
+//
+// 0.6283185 + 0.6283185z
+// ----------------------
+// - 1.3716815 + 2.6283185z
+//
+//-->Hz(3)=Hz(3)/2.6283185
+// Hz =
+//
+// 0.6283185 + 0.6283185z
+// ----------------------
+// - 0.5218856 + z
+//
+//-->Hz(2)=Hz(2)/2.6283185
+// Hz =
+//
+// 0.2390572 + 0.2390572z
+// ----------------------
+// - 0.5218856 + z
+//
+// which is equivalent to
+//Hz =
+//
+// 0.2390572(1 + z^-1)
+// ----------------------
+// 1 - 0.5218856*z^-1
diff --git a/830/CH8/EX8.3.6/IIR_Butter_Analog_Filters.sce b/830/CH8/EX8.3.6/IIR_Butter_Analog_Filters.sce
new file mode 100755
index 000000000..fbbdf674f
--- /dev/null
+++ b/830/CH8/EX8.3.6/IIR_Butter_Analog_Filters.sce
@@ -0,0 +1,41 @@
+//Graphical//
+//Example 8.3.6
+// To Design an Analog Butterworth Filter
+//For the given cutoff frequency Wc = 500 Hz
+clear;
+clc;
+close;
+omegap = 2*%pi*500;
+omegas = 2*%pi*1000;
+delta1_in_dB = -3;
+delta2_in_dB = -40;
+delta1 = 10^(delta1_in_dB/20)
+delta2 = 10^(delta2_in_dB/20)
+//Calculation of Filter Order
+N = log10((1/(delta2^2))-1)/(2*log10(omegas/omegap))
+N = ceil(N)
+omegac = omegap;
+//Poles and Gain Calculation
+[pols,gain]=zpbutt(N,omegac);
+disp(N,'Filter order N =')
+disp(pols,'Pole positions are pols =')
+//Magnitude Response of Analog IIR Butterworth Filter
+h=buttmag(N,omegac,1:1000);
+//Magnitude in dB
+mag=20*log10(h);
+plot2d((1:1000),mag,[0,-180,1000,20]);
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(5)
+xtitle('Magnitude Response of Butterworth LPF Filter Cutoff frequency = 500 Hz','Analog frequency in Hz--->','Magnitude in dB -->');
+//Result
+//Filter order N = 7.
+//s =
+// column 1 to 3
+// -699.07013+3062.8264i -1958.751+2456.196i -2830.4772+1363.086i
+// column 4 to 6
+//-3141.5927+3.847D-13i -2830.4772-1363.086i -1958.751-2456.196i
+//column 7
+//- 699.07013-3062.8264i
diff --git a/830/CH8/EX8.3.7/IIR_Chebychev_Filter_analog.sce b/830/CH8/EX8.3.7/IIR_Chebychev_Filter_analog.sce
new file mode 100755
index 000000000..ecd409cb4
--- /dev/null
+++ b/830/CH8/EX8.3.7/IIR_Chebychev_Filter_analog.sce
@@ -0,0 +1,40 @@
+//Graphical//
+//Example 8.3.7
+//To Design an Analog Chebyshev Filter
+//For the given cutoff frequency = 500 Hz
+clear;
+clc;
+close;
+omegap = 1000*%pi; //Analog Passband Edge frequency in radians/sec
+omegas = 2000*%pi; //Analog Stop band edge frequency in radians/sec
+delta1_in_dB = -1;
+delta2_in_dB = -40;
+delta1 = 10^(delta1_in_dB/20);
+delta2 = 10^(delta2_in_dB/20);
+delta = sqrt(((1/delta2)^2)-1)
+epsilon = sqrt(((1/delta1)^2)-1)
+//Calculation of Filter order
+num = ((sqrt(1-delta2^2))+(sqrt(1-((delta2^2)*(1+epsilon^2)))))/(epsilon*delta2)
+den = (omegas/omegap)+sqrt((omegas/omegap)^2-1)
+N = log10(num)/log10(den)
+//N = (acosh(delta/epsilon))/(acosh(omegas/omegap))
+N = floor(N)
+//Cutoff frequency
+omegac = omegap
+//Calculation of poles and zeros
+[pols,Gn] = zpch1(N,epsilon,omegap)
+disp(N,'Filter order N =');
+disp(pols,'Poles of a type I lowpass Chebyshev filter are Sk =')
+//Analog Filter Transfer Function
+h = poly(Gn,'s','coeff')/real(poly(pols,'s'))
+//Magnitude Response of Chebyshev filter
+[h2]=cheb1mag(N,omegac,epsilon,1:1000)
+//Magnitude in dB
+mag=20*log10(h2);
+plot2d((1:1000),mag,[0,-180,1000,20]);
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(5)
+xtitle('Magnitude Response of Chebyshev Type 1 LPF Filter Cutoff frequency = 500 Hz','Analog frequency in Hz--->','Magnitude in dB -->');
diff --git a/830/CH8/EX8.4.02/IIR_Butter_Transformation_BSF.sce b/830/CH8/EX8.4.02/IIR_Butter_Transformation_BSF.sce
new file mode 100755
index 000000000..c55201ece
--- /dev/null
+++ b/830/CH8/EX8.4.02/IIR_Butter_Transformation_BSF.sce
@@ -0,0 +1,27 @@
+//Graphical//
+//Example 8.4.02
+//To Design an Digital IIR Butterworth Filter from Analog IIR Butterworth Filter
+//and to plot its magnitude response
+//TRANSFORMATION OF LPF TO BSF USING DIGITAL TRANSFORMATION
+clear;
+clc;
+close;
+omegaP = 0.2*%pi;
+omegaL = (2/5)*%pi;
+omegaU = (3/5)*%pi;
+z=poly(0,'z');
+H_LPF = (0.245)*(1+(z^-1))/(1-0.509*(z^-1))
+alpha = (cos((omegaU+omegaL)/2)/cos((omegaU-omegaL)/2));
+k = tan((omegaU - omegaL)/2)*tan(omegaP/2);
+NUM =((z^2)-((2*alpha/(1+k))*z)+((1-k)/(1+k)));
+DEN = (1-((2*alpha/(1+k))*z)+(((1-k)/(1+k))*(z^2)));
+HZ_BPF=horner(H_LPF,NUM/DEN)
+HW =frmag(HZ_BPF(2),HZ_BPF(3),512);
+W = 0:%pi/511:%pi;
+plot(W/%pi,HW)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of BSF Filter','Digital Frequency--->','Magnitude');
diff --git a/830/CH8/EX8.4.1/IIR_ButterworthFilter_Transformation_3.sce b/830/CH8/EX8.4.1/IIR_ButterworthFilter_Transformation_3.sce
new file mode 100755
index 000000000..ca082d2b9
--- /dev/null
+++ b/830/CH8/EX8.4.1/IIR_ButterworthFilter_Transformation_3.sce
@@ -0,0 +1,17 @@
+//Graphical//
+//Caption:Conveting single pole LPF Butterworth filter into BPF
+//Exa8.4.1
+//page698
+clc;
+Op = sym('Op'); //pass band edge frequency of low pass filter
+s = sym('s');
+Ol = sym('Ol'); //lower cutoff frequency of band pass filter
+Ou = sym('Ou'); //upper cutoff frequency of band pass filter
+s1 = Op*(s^2+Ol*Ou)/(s*(Ou-Ol)); //Analog transformation for LPF to BPF
+H_Lpf = Op/(s+Op); //single pole analog LPF Butterworth filter
+H_Bpf = limit(H_Lpf,s,s1); //analog BPF Butterworth filter
+disp(H_Lpf,'H_Lpf =')
+disp(H_Bpf,'H_Bpf =')
+//Result
+//H_Lpf = Op/(s+Op)
+//H_Bpf = (Ou-Ol)*s/(s^2+(Ou-Ol)*s+Ol*Ou)
diff --git a/830/CH8/EX8.4.2/IIR_Butter_Transformation_BPF.sce b/830/CH8/EX8.4.2/IIR_Butter_Transformation_BPF.sce
new file mode 100755
index 000000000..a8275f5ae
--- /dev/null
+++ b/830/CH8/EX8.4.2/IIR_Butter_Transformation_BPF.sce
@@ -0,0 +1,62 @@
+//Graphical//
+//Example 8.4.2
+//To Design an Digital IIR Butterworth Filter from Analog IIR Butterworth Filter
+//and to plot its magnitude response
+//TRANSFORMATION OF LPF TO BPF USING DIGITAL TRANSFORMATION
+clear;
+clc;
+close;
+omegaP = 0.2*%pi;
+omegaL = (2/5)*%pi;
+omegaU = (3/5)*%pi;
+z=poly(0,'z');
+H_LPF = (0.245)*(1+(z^-1))/(1-0.509*(z^-1))
+alpha = (cos((omegaU+omegaL)/2)/cos((omegaU-omegaL)/2));
+k = (cos((omegaU - omegaL)/2)/sin((omegaU - omegaL)/2))*tan(omegaP/2);
+NUM =-((z^2)-((2*alpha*k/(k+1))*z)+((k-1)/(k+1)));
+DEN = (1-((2*alpha*k/(k+1))*z)+(((k-1)/(k+1))*(z^2)));
+HZ_BPF=horner(H_LPF,NUM/DEN)
+disp(HZ_BPF,'Digital BPF IIR Filter H(Z)= ')
+HW =frmag(HZ_BPF(2),HZ_BPF(3),512);
+W = 0:%pi/511:%pi;
+plot(W/%pi,HW)
+a=gca();
+a.thickness = 3;
+a.foreground = 1;
+a.font_style = 9;
+xgrid(1)
+xtitle('Magnitude Response of BPF Filter','Digital Frequency--->','Magnitude');
+//Result
+//Digital BPF IIR Filter H(Z)=
+// 2 3 4
+// 0.245 - 1.577D-17z - 0.245z + 1.577D-17z + 1.360D-17z
+// -----------------------------------------------------
+// 2 3 4
+// - 0.509 + 1.299D-16z - z + 6.438D-17z + 5.551D-17z
+//
+// which is equivalent to
+// H(z) =
+//
+// 2
+// 0.245 - 0 - 0.245z + 0 + 0
+// ---------------------------
+// 2
+// - 0.509 + 0 - z + 0+ 0
+//
+//H(z) =
+//
+// 2
+// 0.245- 0.245z
+// --------------
+// 2
+// - 0.509-z
+//
+//H(z) =
+//
+// -2
+// 0.245- 0.245z
+// --------------
+// -2
+// 0.509+z
+//
+//
diff --git a/830/CH8/EX8.5/Window_Functions.sce b/830/CH8/EX8.5/Window_Functions.sce
new file mode 100755
index 000000000..ef119abf8
--- /dev/null
+++ b/830/CH8/EX8.5/Window_Functions.sce
@@ -0,0 +1,16 @@
+//Graphical//
+//Figure 8.5
+//Program to generate different window functions
+clear;
+close;
+clc
+M =61 ;
+for n = 1:M
+ h_Rect(n) = 1;
+ h_hann(n) = 0.5-0.5*cos(2*%pi*(n-1)/(M-1));
+ h_hamm(n) = 0.54-0.46*cos(2*%pi*(n-1)/(M-1));
+ h_balckmann(n) = 0.42-0.5*cos(2*%pi*n/(M-1))+0.08*cos(4*%pi*n/(M-1));
+end
+plot2d(1:M,[h_Rect,h_hann,h_hamm,h_balckmann],[2,5,7,9]);
+legend(['Rectangular Window';'Hanning';'Hamming';'Balckmann']);
+title('Window Functions for Length M = 61')
diff --git a/830/CH8/EX8.6/Frequency_Response_Window.sce b/830/CH8/EX8.6/Frequency_Response_Window.sce
new file mode 100755
index 000000000..cc1f61f5e
--- /dev/null
+++ b/830/CH8/EX8.6/Frequency_Response_Window.sce
@@ -0,0 +1,35 @@
+//Graphical//
+//Figure 8.6 and Figure 8.7
+//Program to frequency response of
+//(1) Hanning window (2)Hamming window for M = 31 and M = 61
+clear;
+close;
+clc
+M1 = 31;
+M2 = 61;
+for n = 1:M1
+ h_hann_31(n) = 0.5-0.5*cos(2*%pi*(n-1)/(M1-1));
+ h_hamm_31(n) = 0.54-0.46*cos(2*%pi*(n-1)/(M1-1));
+end
+for n = 1:M2
+ h_hann_61(n) = 0.5-0.5*cos(2*%pi*(n-1)/(M2-1));
+ h_hamm_61(n) = 0.54-0.46*cos(2*%pi*(n-1)/(M2-1));
+end
+subplot(2,1,1)
+[h_hann_31_M,fr]=frmag(h_hann_31,512);
+[h_hann_61_M,fr]=frmag(h_hann_61,512);
+h_hann_31_M = 20*log10(h_hann_31_M./max(h_hann_31_M));
+h_hann_61_M = = 20*log10(h_hann_61_M./max(h_hann_61_M));
+plot2d(fr,h_hann_31_M,2);
+plot2d(fr,h_hann_61_M,5);
+legend(['Length M = 31';'Length M = 61']);
+title('Frequency Response 0f Hanning window')
+subplot(2,1,2)
+[h_hamm_31_M,fr]=frmag(h_hamm_31,512);
+[h_hamm_61_M,fr]=frmag(h_hamm_61,512);
+h_hamm_31_M = 20*log10(h_hamm_31_M./max(h_hamm_31_M));
+h_hamm_61_M = = 20*log10(h_hamm_61_M./max(h_hamm_61_M));
+plot2d(fr,h_hamm_31_M,2);
+plot2d(fr,h_hamm_61_M,5);
+legend(['Length M = 31';'Length M = 61']);
+title('Frequency Response of Hamming window')
diff --git a/830/DEPENDENCIES/sinc_new4_02_7.sci b/830/DEPENDENCIES/sinc_new4_02_7.sci
new file mode 100755
index 000000000..0e04c255e
--- /dev/null
+++ b/830/DEPENDENCIES/sinc_new4_02_7.sci
@@ -0,0 +1,6 @@
+function [y]=sinc_new(x)
+i=find(x==0);
+x(i)= 1; // From LS: don't need this is /0 warning is off
+y = sin(%pi*x)./(%pi*x);
+y(i) = 1;
+endfunction
diff --git a/830/DEPENDENCIES/sinc_new4_8.sci b/830/DEPENDENCIES/sinc_new4_8.sci
new file mode 100755
index 000000000..0e04c255e
--- /dev/null
+++ b/830/DEPENDENCIES/sinc_new4_8.sci
@@ -0,0 +1,6 @@
+function [y]=sinc_new(x)
+i=find(x==0);
+x(i)= 1; // From LS: don't need this is /0 warning is off
+y = sin(%pi*x)./(%pi*x);
+y(i) = 1;
+endfunction