diff options
Diffstat (limited to '1319/CH1/EX1.1/1_1.sce')
-rw-r--r-- | 1319/CH1/EX1.1/1_1.sce | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/1319/CH1/EX1.1/1_1.sce b/1319/CH1/EX1.1/1_1.sce new file mode 100644 index 000000000..2cd7a68e6 --- /dev/null +++ b/1319/CH1/EX1.1/1_1.sce @@ -0,0 +1,35 @@ +// To calculate frequency, instantaneous voltage and time of a voltage wave
+
+clc;
+clear;
+
+// The volatage eqaution is v= 0.02 sin (4000t + 30(degress)).
+
+
+Vm=0.02;
+
+deff('a=vol(b)','a=Vm*sind(((4000*b)*(180/%pi))+30)'); // Function for voltage equation
+
+t=320*(10^-6);
+
+w=4000; // angular frequency
+
+// General expression for voltage is given by V=Vm sin ()(2*pi*f*t)+theta)
+// Comparing both the eqautions we get 2*pi*f=4000
+
+f=w/(2*%pi);
+
+v=vol(t);
+
+// 360degress is equal to 1/f s.
+
+//Refer the diagram with this code to understand better.
+// 30degress is
+
+t30=30/(f*360);
+
+disp('Hz',f,'The frequency of the voltage wave =')
+disp('V',v,'The instantaneous voltage at t= 320 micro seconds =')
+
+disp('s',t30,'The time represented by 30 degrees phase difference =')
+
|