summaryrefslogtreecommitdiff
path: root/2294/CH1/EX1.17/EX1_17.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2294/CH1/EX1.17/EX1_17.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2294/CH1/EX1.17/EX1_17.sce')
-rwxr-xr-x2294/CH1/EX1.17/EX1_17.sce35
1 files changed, 35 insertions, 0 deletions
diff --git a/2294/CH1/EX1.17/EX1_17.sce b/2294/CH1/EX1.17/EX1_17.sce
new file mode 100755
index 000000000..806bf7ff6
--- /dev/null
+++ b/2294/CH1/EX1.17/EX1_17.sce
@@ -0,0 +1,35 @@
+//Example 1.17<i>
+//Determine the power and the rms value of the signal
+clc;
+t=0:0.001:10;
+y=5*cos(50*t+%pi/3);
+P=(integrate('5^2*(cos(50*t))^2','t',0,2*%pi))/(2*%pi);
+rmsvalue=sqrt(P);
+disp(P,'The power of the given signal is:');
+disp(rmsvalue,'the rms value is:');
+//Example 1.17<ii>
+//Determine the power amd rms value of the signal
+clc;
+t=0:0.001:10;
+x1=10*sin(50*t+%pi/4);
+x2=16*cos(100*t+%pi/3);
+P1=(integrate('10^2*(sin(50*t))^2','t',0,2*%pi))/(2*%pi);
+P2=(integrate('16^2*(cos(100*t))^2','t',0,2*%pi))/(2*%pi);
+P=P1+P2;
+rmsvalue=sqrt(P);
+disp(P,'The power of the given signal is:');
+disp(rmsvalue,'the rms value is:');
+//Example 1.17 <iii>
+//Determine the power and rms value of the signal
+clc;
+t=0:0.001:10;
+x1=5*cos(15*t);
+x2=5*cos(5*t);
+P1=(integrate('5^2*(cos(15*t))^2','t',0,2*%pi))/(2*%pi);
+P2=(integrate('5^2*(cos(5*t))^2','t',0,2*%pi))/(2*%pi);
+P=P1+P2;
+rmsvalue=sqrt(P);
+disp(P,'The power of the given signal is:');
+disp(rmsvalue,'the rms value is:');
+
+