From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1592/CH3/EX3.18/example_3_18.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 1592/CH3/EX3.18/example_3_18.sce (limited to '1592/CH3/EX3.18/example_3_18.sce') diff --git a/1592/CH3/EX3.18/example_3_18.sce b/1592/CH3/EX3.18/example_3_18.sce new file mode 100755 index 000000000..4bc679ecd --- /dev/null +++ b/1592/CH3/EX3.18/example_3_18.sce @@ -0,0 +1,20 @@ +//Scilab Code for Example 3.18 of Signals and systems by +//P.Ramakrishna Rao +//A=%pi or 3.14 +clear; +clc; +//Trignometric Fourier Coefficients +a(1)=integrate('sin(w)','w',0,%pi); +for n=1:8 +a(2*n+1)=integrate('sin(w+2*n*w)','w',0,%pi)+integrate('sin(w-2*w*n)','w',0,%pi); +end +for n=0:8 +b(n+1)=0; +end +disp(abs(a(1)),"an(a0)"); +disp("an(a1-->a8)"); +n=1:8; +disp(2*a(n+1)); +disp("bn(b1-->b8)"); +n=1:8; +disp(b(n)); -- cgit