summaryrefslogtreecommitdiff
path: root/62/CH7/EX7.47/ex_7_47.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /62/CH7/EX7.47/ex_7_47.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 '62/CH7/EX7.47/ex_7_47.sce')
-rwxr-xr-x62/CH7/EX7.47/ex_7_47.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/62/CH7/EX7.47/ex_7_47.sce b/62/CH7/EX7.47/ex_7_47.sce
new file mode 100755
index 000000000..6aa12c5c0
--- /dev/null
+++ b/62/CH7/EX7.47/ex_7_47.sce
@@ -0,0 +1,31 @@
+clc;
+A=[2 1 0;0 2 1;0 0 2];
+V=[2 0 0;0 2 0; 0 0 2];
+N=[0 1 0;0 0 1;0 0 0];
+z=N*N*N;
+if z==0 then
+ disp("N is a nilpotent of index 3");
+else
+ disp("N is not nilpotent")
+end
+if V*N==N*V then
+ disp("V and N commute")
+else
+ disp("V and N dont commute")
+end
+syms t
+//e^(A*t)=e^(v*t)*e^(N*t)
+e=spec(V);//eigen values
+b2=t^2*%e^(e(3)*t);
+b1=t*%e^(e(2)*t)-b2*2*e(2);
+b0=%e^(e(1)*t)-b1*e(1)-b2*e(1)^2;
+eVt=b0*eye(V)+b1*V+b2*V^2;
+disp(eVt,"e^(Vt)")
+e=spec(N);//eigen values
+b2=t^2*%e^(e(3)*t);
+b1=t*%e^(e(2)*t)-b2*2*e(2);
+b0=%e^(e(1)*t)-b1*e(1)-b2*e(1)^2;
+eNt=b0*eye(N)+b1*N+b2*N^2;
+disp(eNt,"e^(Nt)")
+eAt=eVt*eNt;
+disp(eAt,"e^(A*t)=") \ No newline at end of file