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 --- 1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG | Bin 0 -> 159450 bytes 1574/CH1/EX1.3/Signals_Ex_1_3.sce | 46 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG create mode 100755 1574/CH1/EX1.3/Signals_Ex_1_3.sce (limited to '1574/CH1/EX1.3') diff --git a/1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG b/1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG new file mode 100755 index 000000000..8b7a27063 Binary files /dev/null and b/1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG differ diff --git a/1574/CH1/EX1.3/Signals_Ex_1_3.sce b/1574/CH1/EX1.3/Signals_Ex_1_3.sce new file mode 100755 index 000000000..76e47b109 --- /dev/null +++ b/1574/CH1/EX1.3/Signals_Ex_1_3.sce @@ -0,0 +1,46 @@ +clc +//Chapter1: Signals +//Example2,page no12 +//Given: +//a // Referance Figure on page no 9.. (1.6d) +t=0:2*3.14,t0=0,t1=2*3.14 +disp('a) The value of constants Cn are:') +for i=1:7 + C(i)=((integrate('sin(i*t)','t',t0,t1/2)-integrate('sin(i*t)','t',t1/2,t1))/integrate('(sin(i*t))^2','t',t0,t1)) + if C(i)<=0.01 then C(i)=0 + end + mprintf('%f for n= %d\n',C(i),i) +end +//b Mean Square error + +int1=integrate('(1)^2','t',t0,t1) +for n=1:7 + if modulo(n,2)==0 then + C(n)=0 + else + C(n)=4/(n*%pi) +end +end +for n=1:7 + + K(n)=integrate('(sin(n*t))^2','t',t0,t1) + +end +K(n)=%pi + +for n=1:7 +S(1)=0 + S(n+1)=S(n)+(((C(n))^2)*K(n)) + +end +//Mean Square error +for n=1:7 + epsi(n)=(1/(t1-t0)*(int1-S(n+1))) +end +disp('b) Mean Square error is') +for n=1:2:7 +mprintf('epsi(%d)=%f\n',n,round(100*epsi(n))/100) + +end + + -- cgit