|

JavaMatlabPhpHtmlJavaScriptCSSC#Delphi 1


Linux Unix AutoCAD 3D Access Orcad

Matlab

1. A B .
2. , .
3. A B.
4. A B C , , A , B ( , : , j =1, 2, 3.
5. , - C.
6. A ^. , A .
7. A B, B A.
8. .

-1.2 -0.3 0.2 0.5 2.1 1.3 -0.9 0.7 5.6 1.32 3.91 5.4

9. A B .
10. K.
11. 58 ( zeros.
12. eye , .
13. ones , .
14. rand 45 (, N.
15. diag .
16. A B.
17. , spy, imagesc, colorbar, colormap(gray).

 

:

>> diary labwork3
>> A = [1,2,3
4,5,6
7,8,9]
A =
1 2 3
4 5 6
7 8 9
>> B = [11,12,13
14,15,16
17,18,19]
B =
11 12 13
14 15 16
17 18 19
>> C = zeros(3,3)
C =
0 0 0
0 0 0
0 0 0
>> C = A + B
C =
12 14 16
18 20 22
24 26 28
>> C = A - B
C =
-10 -10 -10
-10 -10 -10
-10 -10 -10
>> C = A * B
C =
90 96 102
216 231 246
342 366 390
>> A'
ans =
1 4 7
2 5 8
3 6 9
>> B'
ans =
11 14 17
12 15 18
13 16 19
>> D = complex(A,B)
D =
1.0000 +11.0000i 2.0000 +12.0000i 3.0000 +13.0000i
4.0000 +14.0000i 5.0000 +15.0000i 6.0000 +16.0000i
7.0000 +17.0000i 8.0000 +18.0000i 9.0000 +19.0000i
>> D'
ans =
1.0000 -11.0000i 4.0000 -14.0000i 7.0000 -17.0000i
2.0000 -12.0000i 5.0000 -15.0000i 8.0000 -18.0000i
3.0000 -13.0000i 6.0000 -16.0000i 9.0000 -19.0000i
>> C = A^2
C =
30 36 42
66 81 96
102 126 150
>> C = A * A
C =
30 36 42
66 81 96
102 126 150
>> AB1 = [A(1),A(2),A(3)]*B
AB1 =

186 198 210
>> BA3 = [A(1,3),A(2,3),A(3,3)]*B
BA3 =
270 288 306
>> R = [-1.2, -0.3, 0.2, 0.5, 2.1, 1.3, -0.9, 0.7, 5.6, 1.32, 3.91, 5.4]
R =
Columns 1 through 7
-1.2000 -0.3000 0.2000 0.5000 2.1000 1.3000 -0.9000
Columns 8 through 12
0.7000 5.6000 1.3200 3.9100 5.4000
>> M = [1.32, 3.91, 5.4]
M =
1.3200 3.9100 5.4000
>> resheniye = R\M
resheniye =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0.2357 0.6982 0.9643
0 0 0
0 0 0
0 0 0
>> K = [A,B
B', A']
K =
1 2 3 11 12 13
4 5 6 14 15 16
7 8 9 17 18 19
11 14 17 1 4 7
12 15 18 2 5 8
13 16 19 3 6 9
>> K(2,:) = []
K =
1 2 3 11 12 13
7 8 9 17 18 19
11 14 17 1 4 7
12 15 18 2 5 8
13 16 19 3 6 9

>> K(3,:) = []
K =
1 2 3 11 12 13
7 8 9 17 18 19
12 15 18 2 5 8
13 16 19 3 6 9
>> K(:,3) = []
K =
1 2 11 12 13
7 8 17 18 19
12 15 2 5 8
13 16 3 6 9
>> H = eye(5,8)
H =
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
>> H1 = eye(5)
H1 =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
>> O = ones(5,5)
O =
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
>> O = ones(5,8)
O =
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
>> N = 5
N =
5

>> M = zeros(4,5)
M =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
>> M = ones(4,5)
M =
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
>> for i = 1:4
M(i,:) = M(i,:)*rand(N);
end
>> M
M =
4.8353 8.5199 6.3956 7.1496 7.0538
3.9716 5.4474 4.5141 4.8245 4.3535
6.9223 6.9300 9.1050 4.6300 8.6308
4.4884 9.4890 7.2130 7.8780 6.5028
>> A = [1,2,3
4,5,6
7,8,9]
A =
1 2 3
4 5 6
7 8 9
>> K = [A,B
A',B']
K =
1 2 3 11 12 13
4 5 6 14 15 16
7 8 9 17 18 19
1 4 7 11 14 17
2 5 8 12 15 18
3 6 9 13 16 19
>> k = K(1,:)
k =
1 2 3 11 12 13
>> k1 = diag(k)
k1 =
1 0 0 0 0 0
0 2 0 0 0 0
0 0 3 0 0 0
0 0 0 11 0 0
0 0 0 0 12 0
0 0 0 0 0 13
A =
1 2 3
4 5 6
7 8 9
>> A(1) = A(1)*-1
A =
-1 2 3
4 5 6
7 8 9
>> A(2) = A(2)^3
A =
-1 2 3
64 5 6
7 8 9
>> spy(A)
>> spy(B)
>> imagesc(B)
>> imagesc(K)
>> imagesc(K)
>> colorbar('vert')
>> colormap(gray)

: 11321





php mysql



C


 


? :

, ? Google !

 
 

© life-prog.ru .