summaryrefslogtreecommitdiff
path: root/2414
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /2414
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '2414')
-rwxr-xr-x2414/CH3/EX3.4/Ex3_4.sce50
-rwxr-xr-x2414/CH5/EX5.8/Ex5_8.sce76
2 files changed, 63 insertions, 63 deletions
diff --git a/2414/CH3/EX3.4/Ex3_4.sce b/2414/CH3/EX3.4/Ex3_4.sce
index f1dfa0b8a..f4b9e13d7 100755
--- a/2414/CH3/EX3.4/Ex3_4.sce
+++ b/2414/CH3/EX3.4/Ex3_4.sce
@@ -1,25 +1,25 @@
-clc;
-clear all;
-//chapter 3
-//page no 85
-//example 3.4
-A=20; //Volts
-T=1*10^-3; //seconds
-f=[-3/T:3/T]; //in kHz
-Vf=[]
-for i=1:length(f)
- if f(i)==0 then
- Vf=[Vf A*T];
- else
- Vf=[Vf A*T*sin(%pi*f(i)*T)/(%pi*f(i)*T)];
-
-end
-end
-clf;
-plot2d(f,Vf,[5])
-a=gca(); // Handle on axes entity
-a.x_location = "origin";
-a.y_location = "origin";
-
-xtitle('Amplitude Spectrum','f,Hz','V(f)');
-xgrid
+clc;
+clear;
+//chapter 3
+//page no 85
+//example 3.4
+A=20; //Volts
+T=1*10^-3; //seconds
+f=[-3/T:3/T]; //in kHz
+Vf=[]
+for i=1:length(f)
+ if f(i)==0 then
+ Vf=[Vf A*T];
+ else
+ Vf=[Vf A*T*sin(%pi*f(i)*T)/(%pi*f(i)*T)];
+
+end
+end
+clf;
+plot2d(f,Vf,[5])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+
+xtitle('Amplitude Spectrum','f,Hz','V(f)');
+xgrid \ No newline at end of file
diff --git a/2414/CH5/EX5.8/Ex5_8.sce b/2414/CH5/EX5.8/Ex5_8.sce
index f94fa74e2..150c8cf72 100755
--- a/2414/CH5/EX5.8/Ex5_8.sce
+++ b/2414/CH5/EX5.8/Ex5_8.sce
@@ -1,38 +1,38 @@
-clc;
-clear all;
-//page no 159
-//prob no. 5.8
-
-//function for ascending pulse
-function V=pulse_a()
- V=[]
- for i=1:.005:1.5
- V=[V i]
- end
-endfunction
-//function for descending pulse
-function V=pulse_d()
- V=[]
- for i=1.5:-.005:1
- V=[V i]
- end
-endfunction
-fLO=200-10;
-
-//for fLO=190 MHz
-f=[0:.01:10.5+.01]; //x axis
-
-V=[zeros(0:.01:199.5-fLO-.01) pulse_a() 0]; //y axis
-clf;
-subplot(211);
-plot2d(f,V,[5],rect=[0,0,12,2])
-xtitle('Spectral diagram:for fLO=190','f,MHz','V(f)');
-
-//for fLO=210
-fLO=200+10; //MHz
-f=[0:.01:10.5+.01]; //x axis
-
-V=[zeros(0:.01:-200.5+fLO-.01) pulse_d() 0]; //y axis
-subplot(212);
-plot2d(f,V,[5],rect=[0,0,12,2])
-xtitle('Spectral Diagram:for fLO=210','f,MHz','V(f)');
+clc;
+clear;
+//page no 159
+//prob no. 5.8
+
+//function for ascending pulse
+function V=pulse_a()
+ V=[]
+ for i=1:.005:1.5
+ V=[V i]
+ end
+endfunction
+//function for descending pulse
+function V=pulse_d()
+ V=[]
+ for i=1.5:-.005:1
+ V=[V i]
+ end
+endfunction
+fLO=200-10;
+
+//for fLO=190 MHz
+f=[0:.01:10.5+.01]; //x axis
+
+V=[zeros(0:.01:199.5-fLO-.01) pulse_a() 0]; //y axis
+clf;
+subplot(211);
+plot2d(f,V,[5],rect=[0,0,12,2])
+xtitle('Spectral diagram:for fLO=190','f,MHz','V(f)');
+
+//for fLO=210
+fLO=200+10; //MHz
+f=[0:.01:10.5+.01]; //x axis
+
+V=[zeros(0:.01:-200.5+fLO-.01) pulse_d() 0]; //y axis
+subplot(212);
+plot2d(f,V,[5],rect=[0,0,12,2])
+xtitle('Spectral Diagram:for fLO=210','f,MHz','V(f)'); \ No newline at end of file