: , .
1.
M n | |||
P |
2. :
2.1. M- :
;
M- NewScript.
.
2.2. :
function [P] = Power_Matr(M, n)
function ( );
Power_Matr , , , . ( );
(x1,) ( );
[y1,] ( ). .
2.3. M-. , .
. .
2.4. CurrentFolder Power_Matr.m. CurrentFolder.
3. .
3.1. , . , , .
.
3.2. .
P=M^n.
3.3. .
3.4. :
, , , , ;
, , . 3.1. ;
. , , , .
4. .
4.1. , .
. - CurrentFolder. , CurrentFolder . , , . 4.1.
4.2. :
;
M-, F9.
. -.
4.3. :
1) . | >> =[1 2;5 4]; >> n=2; | |||||||||||
, ( function) F9 |
| |||||||||||
2) . | >> B=[5 4;1 2]; >> m=1; >> Q=Power_Matr(B,m) | |||||||||||
| ||||||||||||
3) . , ! | >> Z=Power_Matr(m,B) |
. , . , . -, M- , .
5. ,
Power_Matr = @(M, n) M^n;
, Q=Power_Matr(B,m).
, 5 [4] . 3741.