From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2294/CH1/EX1.17/EX1_17.sce | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 2294/CH1/EX1.17/EX1_17.sce (limited to '2294/CH1/EX1.17/EX1_17.sce') 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 +//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 +//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 +//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:'); + + -- cgit