summaryrefslogtreecommitdiff
path: root/842/CH3/EX3.3/Example3_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '842/CH3/EX3.3/Example3_3.sce')
-rwxr-xr-x842/CH3/EX3.3/Example3_3.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/842/CH3/EX3.3/Example3_3.sce b/842/CH3/EX3.3/Example3_3.sce
new file mode 100755
index 000000000..68ce3d358
--- /dev/null
+++ b/842/CH3/EX3.3/Example3_3.sce
@@ -0,0 +1,19 @@
+//clear//
+//Example3.3:Continuous Time Fourier Series Coefficients of
+//a periodic signal x(t) = sin(Wot)
+clear;
+close;
+clc;
+t = 0:0.01:1;
+T = 1;
+Wo = 2*%pi/T;
+xt = sin(Wo*t);
+for k =0:5
+ C(k+1,:) = exp(-sqrt(-1)*Wo*t.*k);
+ a(k+1) = xt*C(k+1,:)'/length(t);
+ if(abs(a(k+1))<=0.01)
+ a(k+1)=0;
+ end
+end
+a =a';
+ak = [-a,a(2:$)];