summaryrefslogtreecommitdiff
path: root/3161/CH1/EX1.1/Ex1_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3161/CH1/EX1.1/Ex1_1.sce')
-rwxr-xr-x3161/CH1/EX1.1/Ex1_1.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/3161/CH1/EX1.1/Ex1_1.sce b/3161/CH1/EX1.1/Ex1_1.sce
new file mode 100755
index 000000000..27e052bfd
--- /dev/null
+++ b/3161/CH1/EX1.1/Ex1_1.sce
@@ -0,0 +1,24 @@
+clc;
+//page 12
+//problem 1.1
+
+//Given signal u = 2*exp(-3*t)
+
+//Since the function integral does not accept %inf as limit we need to use approximation by changing variables.
+
+//First the signal is to be expressed in terms of 'x'.
+
+function y=Signal(x);
+y=2*exp(-3*x);
+endfunction;
+
+//We then substitute x = tan(z), and then express the given signal wrt 'z' and not 'x'.
+
+function y=Gmodified(z);
+x=tan(z);
+y=(Signal(x))^2/(cos(z))^2;
+endfunction;
+
+E = intg(0,atan(10),Gmodified)
+
+disp(E,'The energy of this signal is ');