summaryrefslogtreecommitdiff
path: root/2414/CH3
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /2414/CH3
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/CH3')
-rwxr-xr-x2414/CH3/EX3.4/Ex3_4.sce50
1 files changed, 25 insertions, 25 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