diff options
Diffstat (limited to '845/CH7/EX7.15/Ex7_15.sce')
-rwxr-xr-x | 845/CH7/EX7.15/Ex7_15.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/845/CH7/EX7.15/Ex7_15.sce b/845/CH7/EX7.15/Ex7_15.sce new file mode 100755 index 000000000..b3ec6213b --- /dev/null +++ b/845/CH7/EX7.15/Ex7_15.sce @@ -0,0 +1,27 @@ +//Example 7.15
+
+clc
+clear
+
+n = 2;
+if n==1 then
+ M = [0 2];
+elseif n==2
+ M = [sqrt(1/3) 1; -sqrt(1/3) 1];
+elseif n==3
+ M = [0 8/9; -0.774597 5/9; 0.774597 5/9];
+elseif n==4
+ M = [-0.339981 0.652145; -0.861136 0.347855; 0.339981 0.652145; 0.861136 0.347855];
+elseif n==5
+ M = [-0 0.568889; -0.538469 0.467914; -0.906180 0.236927; 0 0.568889; 0.538469 0.467914; 0.906180 0.236927];
+elseif n==6
+ M = [-0.238619 0.467914; -0.661209 0.360762; -0.932470 0.171325; 0.238619 0.467914; 0.661209 0.360762; 0.932470 0.171325];
+end
+
+X = M(:,1);
+W = M(:,2);
+
+disp(W(1),"W1 = ")
+disp(W(2),"W2 = ")
+disp(X(1),"E1 = ")
+disp(X(2),"E2 = ")
|