лабораторная работа / Максимова т.А. ТАУ (1-4)
.docx
This is a Classroom License for instructional use only.
Research and commercial use is prohibited.
>> A=[9 10 -7 -1;7 0 -1 -5;5 0 -2 1;4 1 2 3]
A =
9 10 -7 -1
7 0 -1 -5
5 0 -2 1
4 1 2 3
>> B=[23 37 22 26]
B =
23 37 22 26
>> x=A/B
x =
0.1298
0.0029
0.0317
0.0821
>> disp(A')
9 7 5 4
10 0 0 1
-7 -1 -2 2
-1 -5 1 3
>> disp(inv(A))
Columns 1 through 3
-0.0074 0.0600 0.0701
0.0910 -0.0088 -0.2237
-0.0216 0.0836 -0.2507
-0.0061 -0.1327 0.1482
Column 4
0.0741
0.0903
0.2156
0.0606
>> disp(B')
23
37
22
26
>> disp(B+3)
26 40 25 29
>> disp(B*3)
69 111 66 78
>> disp(B.^3)
12167 50653 10648 17576
>> disp(A')
9 7 5 4
10 0 0 1
-7 -1 -2 2
-1 -5 1 3
>> disp(A^3)
1050 1051 -889 -825
420 357 -263 -489
547 386 -274 -335
759 652 -440 -301
>> disp(inv(A))
-0.0074 0.0600 0.0701 0.0741
0.0910 -0.0088 -0.2237 0.0903
-0.0216 0.0836 -0.2507 0.2156
-0.0061 -0.1327 0.1482 0.0606
>> disp(expm(A))
1.0e+003 *
-3.2596 -1.3602 -0.1409 -2.5109
-2.1901 -1.5557 0.8667 0.1214
-0.3271 0.7142 -1.2886 -2.6495
0.6584 2.3088 -3.0187 -5.2252
>> disp(logm(A))
2.2928 1.5026 -2.2789 0.6391
1.1945 -0.5230 3.4783 -2.6174
1.4496 -2.2812 3.7021 -1.7265
0.1177 0.6943 0.0752 1.8306
>> disp(sqrtm(A))
2.8755 2.3008 -2.3300 0.5136
1.8087 -0.2029 2.1072 -2.3371
1.5824 -1.5678 2.3289 -0.7997
0.5000 0.3847 0.5415 2.0187
>> X=[9 10 -7 -1;7 0 -1 -5;5 0 -2 1;4 1 2 3]
X =
9 10 -7 -1
7 0 -1 -5
5 0 -2 1
4 1 2 3
>> disp(cond(X))
7.2003
>> disp(norm(X,1))
25
>> disp(norm(X,2))
16.8349
>> disp(rcond(X))
0.0908
>> disp(ranc(X))
??? Undefined function or method 'ranc' for input
arguments of type 'double'.
>> disp(rank(X))
4
>> disp((det(X)))
1484
>> disp(trace(X))
10
>> disp(null(X))
>> disp(orth(X))
-0.8839 0.4366 0.1449 0.0843
-0.3650 -0.8666 0.2510 0.2295
-0.2586 -0.2298 -0.3882 -0.8542
-0.1364 -0.0744 -0.8748 0.4589
>> disp(nef(X))
??? Undefined function or method 'nef' for input
arguments of type 'double'.
>> disp((nef(X)))
??? Undefined function or method 'nef' for input
arguments of type 'double'.
>> disp(rref(X))
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
>> p[1 0 -14 -40 -75]
??? p[1 0 -14 -40 -75]
|
Error: Unbalanced or unexpected parenthesis or
bracket.
>> p=[1 0 -14 -40 -75]
p =
1 0 -14 -40 -75
>> r=(roots(p))
r =
5.0000
-3.0000
-1.0000 + 2.0000i
-1.0000 - 2.0000i
>> disp(poly(r))
1.0000 -0.0000 -14.0000 -40.0000 -75.0000
>> disp(polyval(p,3))
-240
>> disp(polyder(p))
4 0 -28 -40
>> x=0:0.1:1;
>> y=acos(x)-sqrt(1-0.3*x^3)
??? Error using ==> mpower
Matrix must be square.
>> y=acos(x)-sqrt(1-0.3*x.^3)
y =
Columns 1 through 5
0.5708 0.4708 0.3706 0.2702 0.1689
Columns 6 through 10
0.0661 -0.0398 -0.1518 -0.2765 -0.4329
Column 11
-0.8367
>> y=acos(x)-sqrt(1-0.3*x.^3);
>> plot(x,y);grid
>> a