
лабораторная работа / Таня
.doc
FCH
ACH
This is a Classroom License for instructional use only.
Research and commercial use is prohibited.
>> A=[9 10 -7 -4;7 0 -1 -5;5 0 -2 1;4 1 2 3]
A =
9 10 -7 -4
7 0 -1 -5
5 0 -2 1
4 1 2 3
>> B=[23 37 22 26]
B =
23 37 22 26
>> B=[23;37;22;26]
B =
23
37
22
26
>> x=A\B
x =
5.5222
-0.8630
2.7009
-0.2091
>> disp(B')
23 37 22 26
>> disp(B*3)
69
111
66
78
>> disp(B+3)
26
40
25
29
>> disp(B.^3)
12167
50653
10648
17576
>> disp(A')
9 7 5 4
10 0 0 1
-7 -1 -2 2
-4 -5 1 3
>> disp(inv(A))
-0.0073 0.0629 0.0668 0.0728
0.0893 -0.0443 -0.1840 0.1066
-0.0212 0.0920 -0.2601 0.2118
-0.0060 -0.1304 0.1456 0.0596
>> disp(A^3)
747 895 -862 -1212
336 336 -305 -666
487 371 -304 -497
711 640 -464 -532
>> disp(exp(A))
1.0e+004 *
0.8103 2.2026 0.0000 0.0000
0.1097 0.0001 0.0000 0.0000
0.0148 0.0001 0.0000 0.0003
0.0055 0.0003 0.0007 0.0020
>> disp(logm(A))
2.3029 1.5521 -2.1780 0.2764
1.1998 -0.5429 3.3037 -2.3499
1.5024 -2.5384 3.7201 -1.4360
0.1001 0.7510 0.0394 1.8404
>> disp(sqrtm(A))
2.9003 2.3361 -2.2346 -0.0804
1.8061 -0.2416 1.9973 -2.0739
1.6073 -1.7106 2.3016 -0.5562
0.4880 0.4152 0.5200 2.0468
>> p=[1 -14 -40 -75];
>> r=(roots(p)).
??? r=(roots(p)).
|
Error: Unexpected MATLAB operator.
>> r=(roots(p))
r =
16.6695
-1.3348 + 1.6485i
-1.3348 - 1.6485i
>> disp(poly(r))
1.0000 -14.0000 -40.0000 -75.0000
>> disp(polyval(p,3))
-294
>> disp(polyder(p))
3 -28 -40
>> x=0:0.1:10;
>> y=acos(x)-sqrt(1-0.3*x.^3);
>> plot(x,y);grid
Warning: Imaginary parts of complex X and/or Y arguments
ignored
>> x=0:0.1:1:
??? x=0:0.1:1:
|
Error: Expression or statement is incomplete or incorrect.
>> x=0:0.1:1;
>> y=acos(x)-sqrt(1-0.3*x.^3);
>> [TH,R]=cart2pol(x,y);
>> plot(TH,R),grid
>> P1=[-2 6 -4]; P2[1 0 5 5];
??? P1=[-2 6 -4]; P2[1 0 5 5];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P1=[-2 6 -4];P2[1 0 5 5];
??? P1=[-2 6 -4];P2[1 0 5 5];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P1=[-26-4];P2[1055];
??? P1=[-26-4];P2[1055];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P1=[-26-4];P2[1055];
??? P1=[-26-4];P2[1055];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P1=[-26-4];P2[1055];
??? P1=[-26-4];P2[1055];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P1=[-26-4];
>> P2[1055];
??? P2[1055];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P2[155];
??? P2[155];
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> P1=[-2 6 -4];P2=[1 0 5 5];
>> roots(P1);
>> roots(P2);
>> om0=1e-2;omk=1e2;
>> OM=logspace(-2,2,41);p=i*OM;
>> ch=polyval(P1,p);zn=polyval(P2,p);
>> ACH=abs(ch)./abs(zn);
>> FCH=angle(ch./zn)*180/pi;
>> subplot(2,1,1);
>> loglog(OM,ACH);grid
>> semilogx(OM,FCH);grid
>> loglog(OM,ACH);grid
>>