Professional Documents
Culture Documents
вариант 14
вариант 14
вариант 14
1.14
y=((sin(x)).^3+(cos(x)).^3).*log(x)
y=
-2.1704
-2.9849
-0.8822
2.14
A=[1 -1 4; 5 1 2; 3 -1 1];
inv(A)*B %1 arga
ans =
1.8000
3.6000
8.2000
ans =
1.0000 0 0 1.8000
0 1.0000 0 3.6000
0 0 1.0000 8.2000
3.14
syms n;
limit(((n^2+2)/(n^2-2))^(n^2-n),inf)
ans =
exp(4)
4.14
f(-((2*x-1)^7*(2*x+1)^7),3)
ans =
5.14
x=[-10:0.01:10];
y=(2.*x+1).^2.*(2.*x-1).^2;
plot(x,y)
grid on
6.14
syms x;
int((sin(0.5*(x)))^2)
ans =
x/2 - sin(x)/2
7.14
[X,Y] = meshgrid(-8:.5:8);
R = log10(Y.^2-X.^2);
Z = sin(R)./R;
C = gradient(Z);
figure
mesh(X,Y,Z,C)
8.14
dsolve('D3y*x^3+x^2*D2y=0','x')
ans =
C4 + C6*x + C5*x*log(x)
9.14
[x y ]=dsolve('Dx=2*x+8*y','Dy=x+4*y')
x=
2*C9*exp(6*t) - 4*C10
y=
C10 + C9*exp(6*t)
10.14
syms x;
taylor((log(x+3)),x,1,'order',7)
ans =
11.14
%1 arga
quad('sqrt(x.^2-0.14./x)',2.3,6)
%2 arga
x=[2.3:0.01:6];
y=(sqrt(x.^2-0.14./x));
trapz(x,y)
ans =
15.3362
ans =
15.3362
12.14
x=[0:0.01:1];
y=x.^2-cos(x);
plot(x,y)
grid on
x2=fsolve('x.^2-cos(x)',[3 3.2])%2arga
13.14
x=[0.5:0.01:1.5];
y=(-x./(x.^3+2));
plot(x,y)
grid on
[x y]=fminbnd('(-x./(x.^3+2))',0.5,1.5)
x=
1.0000
y=
-0.3333
14.14
function f=FFxy(x)
f=(3*x(1)^2-x(1)^3+3*x(2)^2+4*x(1));
Z=3*X^2-X^3+3*Y^2+4*Y;
mesh(X,Y,Z)
[xmin, minf]=fminsearch(@FFxy,[0.1;-1]);
15.14
function f=FFF(x,y)
f=exp(1)^(-x*y)+1;
[X Y]=ode45(@FFF,[0 1],[0.4]);
plot(X,Y)
[X Y]
ans =
0 0.4000
0.0250 0.4187
0.0500 0.4371
0.0750 0.4552
0.1000 0.4730
0.1250 0.4907
0.1500 0.5084
0.1750 0.5260
0.2000 0.5436
0.2250 0.5614
0.2500 0.5794
0.2750 0.5976
0.3000 0.6161
0.3250 0.6351
0.3500 0.6544
0.3750 0.6743
0.4000 0.6947
0.4250 0.7157
0.4500 0.7375
0.4750 0.7599
0.5000 0.7832
0.5250 0.8074
0.5500 0.8325
0.5750 0.8586
0.6000 0.8858
0.6250 0.9141
0.6500 0.9436
0.6750 0.9744
0.7000 1.0065
0.7250 1.0399
0.7500 1.0748
0.7750 1.1113
0.8000 1.1493
0.8250 1.1891
0.8500 1.2305
0.8750 1.2737
0.9000 1.3189
0.9250 1.3659
0.9500 1.4150
0.9750 1.4662
1.0000 1.5195
16.14
x=[41 55 47 38 45 47 46 48 39 40 41 42 48 50 49 36 44 45 4 44 35 46 43 47 47 48 50 39
46 47 49 38 40 433 36 45 58 42 44 40];
mode(x)
median(x)
Mx=mean(x)
Sx=std(x)
Dx=var(x)
n=length(x);
Ax=sum((x-Mx).^3)/(n-1)/Sx^3
Ex=sum((x-Mx).^4)/(n-1)/Dx^2-3
xx=sort(x);
k=round(n^0.5);
hist(xx,k)
ans =
47
ans =
45
Mx =
53.0500
Sx =
62.1408
Dx =
3.8615e+03
Ax =
5.8434
Ex =
32.8482
17.7
x=[45 42 47 30 36];
y=[21 18 19 6 10];
plot(x,y,'o')
hold on
p=polyfit(x,y,1)
yhat=polyval(p,x);
plot(x,yhat,'r-')
p=
0.8969 -21.0763
18.7
plot(x,y,'o');
p=polyfit(x,1./y,1);
hold on
m=p(1)
b=p(2)
xp=0:0.1:10;
yp=b.*exp(1).^(m.*x);
plot(xp,yp)
m=
-0.0102
b=
0.1104
19.14
x1=[1138.1 1406 2165.8 2619.2 2179.1 1899.5 1715.3 2915.6 2175 2714 4630 3190 1623
2719.5 2117.8 3456 4089 4660 4605.7]';
x2=[2 3 4 5 7 1 14 11 10 14 31 20 9 24 18 29 48 23 23]';
y=[1.35 1.67 1.87 2.15 2.39 2.63 2.89 3.12 3.32 3.65 3.77 4.15 4.38 4.61 4.88 5.06 5.47
5.57 5.82]';
X = [ones(size(x1)) x1 x2 ];
[b,bint,r,rint]= regress(y,X)
scatter3(x1,x2,y,'filled')
hold on
x1fit = min(x1):0.5:max(x1);
x2fit = min(x2):0.5:max(x2);
[X1FIT,X2FIT] = meshgrid(x1fit,x2fit);
YFIT = b(1) + b(2)*X1FIT + b(3)*X2FIT;
mesh(X1FIT,X2FIT,YFIT)
b=
1.6402
0.0003
0.0679
bint =
0.4177 2.8627
-0.0003 0.0009
0.0122 0.1235
r=
-0.8088
-0.6468
-0.7703
-0.7106
-0.4583
0.2829
-0.2773
-0.2475
0.2695
0.1467
-1.5314
0.0794
1.5831
0.4263
1.3059
0.2892
-0.8030
0.8013
1.0696
rint =
-2.4853 0.8677
-2.3803 1.0868
-2.5149 0.9744
-2.4334 1.0121
-2.2652 1.3486
-1.4782 2.0440
-2.0290 1.4744
-2.0592 1.5642
-1.5617 2.1007
-1.7017 1.9951
-2.9908 -0.0721
-1.7625 1.9214
0.0212 3.1450
-1.3425 2.1951
-0.3233 2.9351
-1.4823 2.0608
-2.0103 0.4042
-0.7379 2.3406
-0.4395 2.5787
20.14
x2= [41.4 42.3 46.2 47.8 49 49 41.3 42.4 46.6 47.5 49.2 49 46.7 47.3 49 49.4]';
y= [18.4 15.3 17.6 19.2 18 19.8 21.9 22.4 23.8 21.1 21.6 22.6 25.3 26.8 29 33.4]';
X = [ones(size(x1)) x1 x2 x1.*x2];
[b,bint,r,rint]= regress(y,X)
scatter3(x1,x2,y,'filled')
hold on
x1fit = min(x1):0.5:max(x1);
x2fit = min(x2):0.5:max(x2);
[X1FIT,X2FIT] = meshgrid(x1fit,x2fit);
b=
-279.6790
5.0268
7.0398
-0.1181
bint =
1.0e+03 *
-1.3817 0.8223
-0.0154 0.0255
-0.0162 0.0303
-0.0005 0.0003
r=
-1.1519
-4.5718
-5.2907
-0.0098
-4.8068
-6.0399
2.6926
2.5245
1.0712
0.6792
-0.5105
-2.4816
2.5048
5.8365
3.1601
6.3943
rint =
-7.2052 4.9014
-12.9042 3.7605
-14.0732 3.4917
-7.7255 7.7059
-13.4087 3.7952
-13.9691 1.8892
-5.5808 10.9659
-2.3379 7.3869
-8.4705 10.6130
-8.1029 9.4614
-9.2827 8.2617
-11.5018 6.5385
-6.9163 11.9259
-2.4242 14.0971
-5.4736 11.7937
-0.6036 13.3923