diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1574/CH1/EX1.3 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1574/CH1/EX1.3')
-rwxr-xr-x | 1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG | bin | 0 -> 159450 bytes | |||
-rwxr-xr-x | 1574/CH1/EX1.3/Signals_Ex_1_3.sce | 46 |
2 files changed, 46 insertions, 0 deletions
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 Binary files differnew file mode 100755 index 000000000..8b7a27063 --- /dev/null +++ b/1574/CH1/EX1.3/Result_of_Chapter_1_Ex1_3.JPG 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
+
+
|