1 | % Intructie matlab
|
---|
2 |
|
---|
3 | % 1-4) Equivalente commando's onder Mac OS X uitgevoerd
|
---|
4 |
|
---|
5 | % 5) Help functie weergeven
|
---|
6 | help rowmultiple
|
---|
7 |
|
---|
8 | % 6) Test matrix maken
|
---|
9 | A = [ 1, 2, 3;
|
---|
10 | 4, 5, 6;
|
---|
11 | 7, 8, 9; ];
|
---|
12 | % 7)
|
---|
13 | B = rowswap(A, 1, 3)
|
---|
14 | B = rowcombine(A, 3, 2, 4)
|
---|
15 | B = rowmultiple(A, 3, 0.5)
|
---|
16 |
|
---|
17 | % 8) maar er een spoormatrix van
|
---|
18 | M = [ 3, 1, 5, 7;
|
---|
19 | 2, 4, -1, 0;
|
---|
20 | 5, 7, 3, 1; ];
|
---|
21 | M1 = rowmultiple(M, 1, 2)
|
---|
22 | M2 = rowmultiple(M1, 3, 2)
|
---|
23 | M3 = rowswap(M2, 1, 2)
|
---|
24 | M4 = rowcombine(M3, 2, 1, -3)
|
---|
25 | M5 = rowcombine(M4, 3, 1, -5)
|
---|
26 | M6 = rowcombine(M5, 3, 2, -0.6)
|
---|
27 | M7 = rowmultiple(M6,3, 1/3.2)
|
---|
28 | M8 = rowcombine(M7, 2, 3, -13)
|
---|
29 | M9 = rowcombine(M8, 1, 3, 1)
|
---|
30 | M10 = rowmultiple(M9, 2, -0.1)
|
---|
31 | M11 = rowcombine(M10, 1, 2, -4)
|
---|
32 | Mfinal = rowmultiple(M11, 1, .5)
|
---|
33 |
|
---|
34 | % 9)
|
---|
35 | SpoorM = rref(M)
|
---|
36 |
|
---|
37 | % 10)
|
---|
38 | % Ze komen overeen
|
---|
39 | pause
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 |
|
---|