Zadania 1


w=(0.984^(1.5)-371^(1/7))/(2.65^1.6)

w =

-0.2844

u=log(1.23^(1/3)+0.78^(1/4)+2)

u =

1.3891

t=cos(4*pi/6)+sin(51*pi/180)+atan(0.5)^3

t =

0.3768

clear
clc
x=2*pi

x =

6.2832

y=(exp(-2*x^2)+1)/(2*sin(x+2)^2)

y =

0.6047

clear
clc
x=[1:0.2:2]

x =

Columns 1 through 5

1.0000 1.2000 1.4000 1.6000 1.8000

Column 6

2.0000

y=2*x-cos(3*x+1)^2
??? Error using ==> mpower
Matrix must be square.

y=2*x.-cos(3*x+1).^2
??? y=2*x.-cos(3*x+1).^2
|
Error: Unexpected MATLAB operator.

y=2*x-cos(3*x+1).^2

y =

Columns 1 through 5

1.5728 2.3874 2.5805 2.4159 2.6136

Column 6

3.4316

clear
clc
krok=(2-0)/49

krok =

0.0408

x=0:krok:2

x =

Columns 1 through 5

0 0.0408 0.0816 0.1224 0.1633

Columns 6 through 10

0.2041 0.2449 0.2857 0.3265 0.3673

Columns 11 through 15

0.4082 0.4490 0.4898 0.5306 0.5714

Columns 16 through 20

0.6122 0.6531 0.6939 0.7347 0.7755

Columns 21 through 25

0.8163 0.8571 0.8980 0.9388 0.9796

Columns 26 through 30

1.0204 1.0612 1.1020 1.1429 1.1837

Columns 31 through 35

1.2245 1.2653 1.3061 1.3469 1.3878

Columns 36 through 40

1.4286 1.4694 1.5102 1.5510 1.5918

Columns 41 through 45

1.6327 1.6735 1.7143 1.7551 1.7959

Columns 46 through 50

1.8367 1.8776 1.9184 1.9592 2.0000

y=(x*exp(x.^2))./(1+x).^2
??? Error using ==> mtimes
Inner matrix dimensions must agree.

y=(x.*exp(x.^2))./(1+x).^2

y =

Columns 1 through 4

0 0.0377 0.0702 0.0987

Columns 5 through 8

0.1239 0.1468 0.1678 0.1875

Columns 9 through 12

0.2064 0.2249 0.2432 0.2616

Columns 13 through 16

0.2805 0.3001 0.3208 0.3427

Columns 17 through 20

0.3661 0.3914 0.4189 0.4489

Columns 21 through 24

0.4818 0.5181 0.5583 0.6029

Columns 25 through 28

0.6526 0.7081 0.7703 0.8402

Columns 29 through 32

0.9189 1.0077 1.1083 1.2225

Columns 33 through 36

1.3524 1.5006 1.6700 1.8643

Columns 37 through 40

2.0876 2.3449 2.6421 2.9865

Columns 41 through 44

3.3864 3.8522 4.3961 5.0329

Columns 45 through 48

5.7807 6.6610 7.7005 8.9313

Columns 49 through 50

10.3927 12.1329

plot(x,y)
clear
clc
krok=(2-1)/59

krok =

0.0169

x=1:krok:2

x =

Columns 1 through 5

1.0000 1.0169 1.0339 1.0508 1.0678

Columns 6 through 10

1.0847 1.1017 1.1186 1.1356 1.1525

Columns 11 through 15

1.1695 1.1864 1.2034 1.2203 1.2373

Columns 16 through 20

1.2542 1.2712 1.2881 1.3051 1.3220

Columns 21 through 25

1.3390 1.3559 1.3729 1.3898 1.4068

Columns 26 through 30

1.4237 1.4407 1.4576 1.4746 1.4915

Columns 31 through 35

1.5085 1.5254 1.5424 1.5593 1.5763

Columns 36 through 40

1.5932 1.6102 1.6271 1.6441 1.6610

Columns 41 through 45

1.6780 1.6949 1.7119 1.7288 1.7458

Columns 46 through 50

1.7627 1.7797 1.7966 1.8136 1.8305

Columns 51 through 55

1.8475 1.8644 1.8814 1.8983 1.9153

Columns 56 through 60

1.9322 1.9492 1.9661 1.9831 2.0000

y=(exp(-x.^2)*(log(x)+1))./(1+x).^3
??? Error using ==> mtimes
Inner matrix dimensions must agree.

y=(exp(-x.^2).*(log(x)+1))./(1+x).^3

y =

Columns 1 through 4

0.0460 0.0441 0.0422 0.0403

Columns 5 through 8

0.0385 0.0368 0.0351 0.0335

Columns 9 through 12

0.0319 0.0303 0.0288 0.0274

Columns 13 through 16

0.0260 0.0247 0.0234 0.0222

Columns 17 through 20

0.0210 0.0199 0.0188 0.0178

Columns 21 through 24

0.0168 0.0159 0.0150 0.0141

Columns 25 through 28

0.0133 0.0125 0.0118 0.0111

Columns 29 through 32

0.0104 0.0098 0.0092 0.0086

Columns 33 through 36

0.0081 0.0076 0.0071 0.0066

Columns 37 through 40

0.0062 0.0058 0.0054 0.0051

Columns 41 through 44

0.0047 0.0044 0.0041 0.0038

Columns 45 through 48

0.0036 0.0033 0.0031 0.0029

Columns 49 through 52

0.0027 0.0025 0.0023 0.0021

Columns 53 through 56

0.0020 0.0018 0.0017 0.0016

Columns 57 through 60

0.0015 0.0013 0.0012 0.0011

plot(x,y)
clear
clc
krok=(3.5-(pi/2))/100

krok =

0.0193

x=pi/2:krok:3.5

x =

Columns 1 through 5

1.5708 1.5901 1.6094 1.6287 1.6480

Columns 6 through 10

1.6673 1.6865 1.7058 1.7251 1.7444

Columns 11 through 15

1.7637 1.7830 1.8023 1.8216 1.8409

Columns 16 through 20

1.8602 1.8795 1.8988 1.9181 1.9373

Columns 21 through 25

1.9566 1.9759 1.9952 2.0145 2.0338

Columns 26 through 30

2.0531 2.0724 2.0917 2.1110 2.1303

Columns 31 through 35

2.1496 2.1688 2.1881 2.2074 2.2267

Columns 36 through 40

2.2460 2.2653 2.2846 2.3039 2.3232

Columns 41 through 45

2.3425 2.3618 2.3811 2.4004 2.4196

Columns 46 through 50

2.4389 2.4582 2.4775 2.4968 2.5161

Columns 51 through 55

2.5354 2.5547 2.5740 2.5933 2.6126

Columns 56 through 60

2.6319 2.6512 2.6704 2.6897 2.7090

Columns 61 through 65

2.7283 2.7476 2.7669 2.7862 2.8055

Columns 66 through 70

2.8248 2.8441 2.8634 2.8827 2.9019

Columns 71 through 75

2.9212 2.9405 2.9598 2.9791 2.9984

Columns 76 through 80

3.0177 3.0370 3.0563 3.0756 3.0949

Columns 81 through 85

3.1142 3.1335 3.1527 3.1720 3.1913

Columns 86 through 90

3.2106 3.2299 3.2492 3.2685 3.2878

Columns 91 through 95

3.3071 3.3264 3.3457 3.3650 3.3842

Columns 96 through 100

3.4035 3.4228 3.4421 3.4614 3.4807

Column 101

3.5000

y=(x.^(2*x+1)+3*x.^2)./(4*x.^(1/2))

y =

1.0e+003 *

Columns 1 through 4

0.0028 0.0029 0.0030 0.0031

Columns 5 through 8

0.0033 0.0034 0.0035 0.0037

Columns 9 through 12

0.0039 0.0040 0.0042 0.0044

Columns 13 through 16

0.0046 0.0048 0.0051 0.0053

Columns 17 through 20

0.0056 0.0059 0.0062 0.0065

Columns 21 through 24

0.0069 0.0073 0.0077 0.0081

Columns 25 through 28

0.0086 0.0091 0.0096 0.0102

Columns 29 through 32

0.0108 0.0115 0.0122 0.0130

Columns 33 through 36

0.0138 0.0147 0.0157 0.0167

Columns 37 through 40

0.0178 0.0191 0.0204 0.0218

Columns 41 through 44

0.0233 0.0250 0.0268 0.0287

Columns 45 through 48

0.0308 0.0331 0.0355 0.0382

Columns 49 through 52

0.0411 0.0442 0.0476 0.0512

Columns 53 through 56

0.0552 0.0595 0.0642 0.0693

Columns 57 through 60

0.0748 0.0808 0.0873 0.0944

Columns 61 through 64

0.1021 0.1105 0.1196 0.1294

Columns 65 through 68

0.1402 0.1519 0.1647 0.1785

Columns 69 through 72

0.1936 0.2101 0.2280 0.2476

Columns 73 through 76

0.2689 0.2921 0.3174 0.3450

Columns 77 through 80

0.3751 0.4079 0.4438 0.4829

Columns 81 through 84

0.5257 0.5723 0.6233 0.6790

Columns 85 through 88

0.7398 0.8063 0.8790 0.9584

Columns 89 through 92

1.0453 1.1403 1.2443 1.3581

Columns 93 through 96

1.4826 1.6188 1.7680 1.9314

Columns 97 through 100

2.1103 2.3062 2.5209 2.7562

Column 101

3.0141

x=linspace(-pi,pi,100)

x =

Columns 1 through 4

-3.1416 -3.0781 -3.0147 -2.9512

Columns 5 through 8

-2.8877 -2.8243 -2.7608 -2.6973

Columns 9 through 12

-2.6339 -2.5704 -2.5069 -2.4435

Columns 13 through 16

-2.3800 -2.3165 -2.2531 -2.1896

Columns 17 through 20

-2.1261 -2.0627 -1.9992 -1.9357

Columns 21 through 24

-1.8723 -1.8088 -1.7453 -1.6819

Columns 25 through 28

-1.6184 -1.5549 -1.4915 -1.4280

Columns 29 through 32

-1.3645 -1.3011 -1.2376 -1.1741

Columns 33 through 36

-1.1107 -1.0472 -0.9837 -0.9203

Columns 37 through 40

-0.8568 -0.7933 -0.7299 -0.6664

Columns 41 through 44

-0.6029 -0.5395 -0.4760 -0.4125

Columns 45 through 48

-0.3491 -0.2856 -0.2221 -0.1587

Columns 49 through 52

-0.0952 -0.0317 0.0317 0.0952

Columns 53 through 56

0.1587 0.2221 0.2856 0.3491

Columns 57 through 60

0.4125 0.4760 0.5395 0.6029

Columns 61 through 64

0.6664 0.7299 0.7933 0.8568

Columns 65 through 68

0.9203 0.9837 1.0472 1.1107

Columns 69 through 72

1.1741 1.2376 1.3011 1.3645

Columns 73 through 76

1.4280 1.4915 1.5549 1.6184

Columns 77 through 80

1.6819 1.7453 1.8088 1.8723

Columns 81 through 84

1.9357 1.9992 2.0627 2.1261

Columns 85 through 88

2.1896 2.2531 2.3165 2.3800

Columns 89 through 92

2.4435 2.5069 2.5704 2.6339

Columns 93 through 96

2.6973 2.7608 2.8243 2.8877

Columns 97 through 100

2.9512 3.0147 3.0781 3.1416

y=x.*exp(-sin(x).^2-pi/4)

y =

Columns 1 through 4

-1.4324 -1.3978 -1.3526 -1.2982

Columns 5 through 8

-1.2361 -1.1682 -1.0964 -1.0224

Columns 9 through 12

-0.9481 -0.8749 -0.8042 -0.7370

Columns 13 through 16

-0.6740 -0.6157 -0.5624 -0.5142

Columns 17 through 20

-0.4709 -0.4324 -0.3985 -0.3688

Columns 21 through 24

-0.3430 -0.3207 -0.3017 -0.2856

Columns 25 through 28

-0.2721 -0.2609 -0.2517 -0.2444

Columns 29 through 32

-0.2387 -0.2343 -0.2310 -0.2286

Columns 33 through 36

-0.2269 -0.2255 -0.2243 -0.2227

Columns 37 through 40

-0.2207 -0.2177 -0.2133 -0.2073

Columns 41 through 44

-0.1993 -0.1889 -0.1759 -0.1602

Columns 45 through 48

-0.1416 -0.1203 -0.0965 -0.0706

Columns 49 through 52

-0.0430 -0.0145 0.0145 0.0430

Columns 53 through 56

0.0706 0.0965 0.1203 0.1416

Columns 57 through 60

0.1602 0.1759 0.1889 0.1993

Columns 61 through 64

0.2073 0.2133 0.2177 0.2207

Columns 65 through 68

0.2227 0.2243 0.2255 0.2269

Columns 69 through 72

0.2286 0.2310 0.2343 0.2387

Columns 73 through 76

0.2444 0.2517 0.2609 0.2721

Columns 77 through 80

0.2856 0.3017 0.3207 0.3430

Columns 81 through 84

0.3688 0.3985 0.4324 0.4709

Columns 85 through 88

0.5142 0.5624 0.6157 0.6740

Columns 89 through 92

0.7370 0.8042 0.8749 0.9481

Columns 93 through 96

1.0224 1.0964 1.1682 1.2361

Columns 97 through 100

1.2982 1.3526 1.3978 1.4324

plot(x,y)
clear
clc
x=linspace(-2*pi,2*pi,100)

x =

Columns 1 through 5

-6.2832 -6.1563 -6.0293 -5.9024 -5.7755

Columns 6 through 10

-5.6485 -5.5216 -5.3947 -5.2677 -5.1408

Columns 11 through 15

-5.0139 -4.8869 -4.7600 -4.6331 -4.5061

Columns 16 through 20

-4.3792 -4.2523 -4.1253 -3.9984 -3.8715

Columns 21 through 25

-3.7445 -3.6176 -3.4907 -3.3637 -3.2368

Columns 26 through 30

-3.1099 -2.9829 -2.8560 -2.7291 -2.6021

Columns 31 through 35

-2.4752 -2.3483 -2.2213 -2.0944 -1.9675

Columns 36 through 40

-1.8405 -1.7136 -1.5867 -1.4597 -1.3328

Columns 41 through 45

-1.2059 -1.0789 -0.9520 -0.8251 -0.6981

Columns 46 through 50

-0.5712 -0.4443 -0.3173 -0.1904 -0.0635

Columns 51 through 55

0.0635 0.1904 0.3173 0.4443 0.5712

Columns 56 through 60

0.6981 0.8251 0.9520 1.0789 1.2059

Columns 61 through 65

1.3328 1.4597 1.5867 1.7136 1.8405

Columns 66 through 70

1.9675 2.0944 2.2213 2.3483 2.4752

Columns 71 through 75

2.6021 2.7291 2.8560 2.9829 3.1099

Columns 76 through 80

3.2368 3.3637 3.4907 3.6176 3.7445

Columns 81 through 85

3.8715 3.9984 4.1253 4.2523 4.3792

Columns 86 through 90

4.5061 4.6331 4.7600 4.8869 5.0139

Columns 91 through 95

5.1408 5.2677 5.3947 5.5216 5.6485

Columns 96 through 100

5.7755 5.9024 6.0293 6.1563 6.2832

f=sin(x)

f =

Columns 1 through 4

0.0000 0.1266 0.2511 0.3717

Columns 5 through 8

0.4862 0.5929 0.6901 0.7761

Columns 9 through 12

0.8497 0.9096 0.9549 0.9848

Columns 13 through 16

0.9989 0.9969 0.9788 0.9450

Columns 17 through 20

0.8960 0.8326 0.7557 0.6668

Columns 21 through 24

0.5671 0.4582 0.3420 0.2203

Columns 25 through 28

0.0951 -0.0317 -0.1580 -0.2817

Columns 29 through 32

-0.4009 -0.5137 -0.6182 -0.7127

Columns 33 through 36

-0.7958 -0.8660 -0.9224 -0.9638

Columns 37 through 40

-0.9898 -0.9999 -0.9938 -0.9718

Columns 41 through 44

-0.9341 -0.8815 -0.8146 -0.7346

Columns 45 through 48

-0.6428 -0.5406 -0.4298 -0.3120

Columns 49 through 52

-0.1893 -0.0634 0.0634 0.1893

Columns 53 through 56

0.3120 0.4298 0.5406 0.6428

Columns 57 through 60

0.7346 0.8146 0.8815 0.9341

Columns 61 through 64

0.9718 0.9938 0.9999 0.9898

Columns 65 through 68

0.9638 0.9224 0.8660 0.7958

Columns 69 through 72

0.7127 0.6182 0.5137 0.4009

Columns 73 through 76

0.2817 0.1580 0.0317 -0.0951

Columns 77 through 80

-0.2203 -0.3420 -0.4582 -0.5671

Columns 81 through 84

-0.6668 -0.7557 -0.8326 -0.8960

Columns 85 through 88

-0.9450 -0.9788 -0.9969 -0.9989

Columns 89 through 92

-0.9848 -0.9549 -0.9096 -0.8497

Columns 93 through 96

-0.7761 -0.6901 -0.5929 -0.4862

Columns 97 through 100

-0.3717 -0.2511 -0.1266 -0.0000

g=sin(x)^2
??? Error using ==> mpower
Matrix must be square.

g=sin(x).^2

g =

Columns 1 through 4

0.0000 0.0160 0.0631 0.1381

Columns 5 through 8

0.2364 0.3515 0.4762 0.6024

Columns 9 through 12

0.7220 0.8274 0.9118 0.9698

Columns 13 through 16

0.9977 0.9937 0.9581 0.8930

Columns 17 through 20

0.8028 0.6932 0.5712 0.4446

Columns 21 through 24

0.3216 0.2100 0.1170 0.0485

Columns 25 through 28

0.0090 0.0010 0.0250 0.0794

Columns 29 through 32

0.1607 0.2639 0.3821 0.5079

Columns 33 through 36

0.6332 0.7500 0.8507 0.9290

Columns 37 through 40

0.9797 0.9997 0.9877 0.9444

Columns 41 through 44

0.8726 0.7770 0.6635 0.5396

Columns 45 through 48

0.4132 0.2923 0.1847 0.0974

Columns 49 through 52

0.0358 0.0040 0.0040 0.0358

Columns 53 through 56

0.0974 0.1847 0.2923 0.4132

Columns 57 through 60

0.5396 0.6635 0.7770 0.8726

Columns 61 through 64

0.9444 0.9877 0.9997 0.9797

Columns 65 through 68

0.9290 0.8507 0.7500 0.6332

Columns 69 through 72

0.5079 0.3821 0.2639 0.1607

Columns 73 through 76

0.0794 0.0250 0.0010 0.0090

Columns 77 through 80

0.0485 0.1170 0.2100 0.3216

Columns 81 through 84

0.4446 0.5712 0.6932 0.8028

Columns 85 through 88

0.8930 0.9581 0.9937 0.9977

Columns 89 through 92

0.9698 0.9118 0.8274 0.7220

Columns 93 through 96

0.6024 0.4762 0.3515 0.2364

Columns 97 through 100

0.1381 0.0631 0.0160 0.0000

h=sin(x).^3

h =

Columns 1 through 4

0.0000 0.0020 0.0158 0.0513

Columns 5 through 8

0.1149 0.2084 0.3286 0.4676

Columns 9 through 12

0.6135 0.7527 0.8707 0.9551

Columns 13 through 16

0.9966 0.9906 0.9377 0.8439

Columns 17 through 20

0.7193 0.5771 0.4317 0.2964

Columns 21 through 24

0.1823 0.0962 0.0400 0.0107

Columns 25 through 28

0.0009 -0.0000 -0.0039 -0.0224

Columns 29 through 32

-0.0644 -0.1355 -0.2362 -0.3620

Columns 33 through 36

-0.5039 -0.6495 -0.7847 -0.8954

Columns 37 through 40

-0.9698 -0.9996 -0.9816 -0.9178

Columns 41 through 44

-0.8152 -0.6849 -0.5405 -0.3964

Columns 45 through 48

-0.2656 -0.1580 -0.0794 -0.0304

Columns 49 through 52

-0.0068 -0.0003 0.0003 0.0068

Columns 53 through 56

0.0304 0.0794 0.1580 0.2656

Columns 57 through 60

0.3964 0.5405 0.6849 0.8152

Columns 61 through 64

0.9178 0.9816 0.9996 0.9698

Columns 65 through 68

0.8954 0.7847 0.6495 0.5039

Columns 69 through 72

0.3620 0.2362 0.1355 0.0644

Columns 73 through 76

0.0224 0.0039 0.0000 -0.0009

Columns 77 through 80

-0.0107 -0.0400 -0.0962 -0.1823

Columns 81 through 84

-0.2964 -0.4317 -0.5771 -0.7193

Columns 85 through 88

-0.8439 -0.9377 -0.9906 -0.9966

Columns 89 through 92

-0.9551 -0.8707 -0.7527 -0.6135

Columns 93 through 96

-0.4676 -0.3286 -0.2084 -0.1149

Columns 97 through 100

-0.0513 -0.0158 -0.0020 -0.0000

plot(x,f,x,g,x,h)
plot(x,f,'r')
plot(x,f,'r-',x,g,'g:',x,h,'b--')
clear
clc
j=sin(2*x)
??? Undefined function or variable 'x'.

j=sin(2*x)
??? Undefined function or variable 'x'.

j=sin(2*x)
??? Undefined function or variable 'x'.

j=sin(2.*x)
??? Undefined function or variable 'x'.

j=sin(2*.x)
??? j=sin(2*.x)
|
Error: Unexpected MATLAB operator.

j=sin(2.*x)
??? Undefined function or variable 'x'.

x=linspace(-2*pi,2*pi,100)

x =

Columns 1 through 5

-6.2832 -6.1563 -6.0293 -5.9024 -5.7755

Columns 6 through 10

-5.6485 -5.5216 -5.3947 -5.2677 -5.1408

Columns 11 through 15

-5.0139 -4.8869 -4.7600 -4.6331 -4.5061

Columns 16 through 20

-4.3792 -4.2523 -4.1253 -3.9984 -3.8715

Columns 21 through 25

-3.7445 -3.6176 -3.4907 -3.3637 -3.2368

Columns 26 through 30

-3.1099 -2.9829 -2.8560 -2.7291 -2.6021

Columns 31 through 35

-2.4752 -2.3483 -2.2213 -2.0944 -1.9675

Columns 36 through 40

-1.8405 -1.7136 -1.5867 -1.4597 -1.3328

Columns 41 through 45

-1.2059 -1.0789 -0.9520 -0.8251 -0.6981

Columns 46 through 50

-0.5712 -0.4443 -0.3173 -0.1904 -0.0635

Columns 51 through 55

0.0635 0.1904 0.3173 0.4443 0.5712

Columns 56 through 60

0.6981 0.8251 0.9520 1.0789 1.2059

Columns 61 through 65

1.3328 1.4597 1.5867 1.7136 1.8405

Columns 66 through 70

1.9675 2.0944 2.2213 2.3483 2.4752

Columns 71 through 75

2.6021 2.7291 2.8560 2.9829 3.1099

Columns 76 through 80

3.2368 3.3637 3.4907 3.6176 3.7445

Columns 81 through 85

3.8715 3.9984 4.1253 4.2523 4.3792

Columns 86 through 90

4.5061 4.6331 4.7600 4.8869 5.0139

Columns 91 through 95

5.1408 5.2677 5.3947 5.5216 5.6485

Columns 96 through 100

5.7755 5.9024 6.0293 6.1563 6.2832

j=sin(2*x)

j =

Columns 1 through 4

0.0000 0.2511 0.4862 0.6901

Columns 5 through 8

0.8497 0.9549 0.9989 0.9788

Columns 9 through 12

0.8960 0.7557 0.5671 0.3420

Columns 13 through 16

0.0951 -0.1580 -0.4009 -0.6182

Columns 17 through 20

-0.7958 -0.9224 -0.9898 -0.9938

Columns 21 through 24

-0.9341 -0.8146 -0.6428 -0.4298

Columns 25 through 28

-0.1893 0.0634 0.3120 0.5406

Columns 29 through 32

0.7346 0.8815 0.9718 0.9999

Columns 33 through 36

0.9638 0.8660 0.7127 0.5137

Columns 37 through 40

0.2817 0.0317 -0.2203 -0.4582

Columns 41 through 44

-0.6668 -0.8326 -0.9450 -0.9969

Columns 45 through 48

-0.9848 -0.9096 -0.7761 -0.5929

Columns 49 through 52

-0.3717 -0.1266 0.1266 0.3717

Columns 53 through 56

0.5929 0.7761 0.9096 0.9848

Columns 57 through 60

0.9969 0.9450 0.8326 0.6668

Columns 61 through 64

0.4582 0.2203 -0.0317 -0.2817

Columns 65 through 68

-0.5137 -0.7127 -0.8660 -0.9638

Columns 69 through 72

-0.9999 -0.9718 -0.8815 -0.7346

Columns 73 through 76

-0.5406 -0.3120 -0.0634 0.1893

Columns 77 through 80

0.4298 0.6428 0.8146 0.9341

Columns 81 through 84

0.9938 0.9898 0.9224 0.7958

Columns 85 through 88

0.6182 0.4009 0.1580 -0.0951

Columns 89 through 92

-0.3420 -0.5671 -0.7557 -0.8960

Columns 93 through 96

-0.9788 -0.9989 -0.9549 -0.8497

Columns 97 through 100

-0.6901 -0.4862 -0.2511 -0.0000

subplot(2,2,1)
plot(x,j)
subplot(2,2,2)
plot(x,f)
??? Undefined function or variable 'f'.

clear
clc
x=linspace(1,2,60);
f=exp(sin(x).^2);
g=sin(x.^2)*cos(x);
??? Error using ==> mtimes
Inner matrix dimensions must agree.

g=sin(x.^2).*cos(x);
h=(x.^(1/3))./log(x+1);
subplot(2,2,1)
plot(x,f,'b')
clear
clc
x=linspace(-2,2,10);
y=cos(10*exp(x))

y =

Columns 1 through 5

0.2157 -0.5141 -0.9887 0.4094 -0.1528

Columns 6 through 10

0.9970 0.8093 0.5074 -0.9681 0.0631

plot(x,y)
clear
clc
x=linspace(-2,2,50);
y=cos(50*exp(x))

y =

Columns 1 through 5

0.8853 0.4896 -0.1126 -0.7107 -0.9990

Columns 6 through 10

-0.7298 0.0477 0.8344 0.9067 0.0295

Columns 11 through 15

-0.9209 -0.6203 0.6770 0.7611 -0.7162

Columns 16 through 20

-0.5129 0.9886 -0.3923 -0.4195 0.8785

Columns 21 through 25

-0.9975 0.9922 -0.9975 0.9676 -0.6399

Columns 26 through 30

-0.2443 0.9994 0.0588 -0.8461 -0.9981

Columns 31 through 35

-0.9792 -0.9846 -0.4337 0.8970 -0.1987

Columns 36 through 40

0.0112 -0.5712 0.8841 0.9607 0.9990

Columns 41 through 45

0.2870 -0.7993 0.2756 0.9824 0.8287

Columns 46 through 50

-0.8757 0.9847 0.9364 0.3628 0.3105

plot(x,y,'-*')
fplot('cos(10*exp(x))'[-2 2])
??? fplot('cos(10*exp(x))'[-2 2])
|
Error: Unbalanced or unexpected parenthesis or
bracket.

fplot('cos(10*exp(x))',[-2 2])
fplot('cos(50*exp(x))',[-2 2])
clear
clc
x=fzero('cos(2*x-pi)',3)

x =

2.3562

x=fzero('abs(x)-1',1)

x =

1

x=fzero('abs(x)+1',1)
Exiting fzero: aborting search for an interval containing a sign change
because NaN or Inf function value encountered during search.
(Function value at -Inf is Inf.)
Check function or try again with a different starting value.

x =

NaN

clear
clc
fplot('sin(x)+x/10',[-3 3])
fzero('sin(x)+x/10',0)

ans =

0

clear
clc
fplot('(x+1)*log(x)-1.4',[0.1 4])
fzero('(x+1)*log(x)-1.4',2)

ans =

1.6846

clear
clc
fplot('3*log(x)-sin(2*x+x)^2',[0.1 5])
fzero('3*log(x)-sin(2*x+x)^2',2)

ans =

1.0053

clear
clc
fplot('x^2-(1/(3*x^2-1))-log10(x)-3',[0.1 5])
fzero('x^2-(1/(3*x^2-1))-log10(x)-3',0.5)

ans =

0.4442

fplot('log(x)+asin(x)',[0.1 5])
Warning: Imaginary parts of complex X and/or Y
arguments ignored
> In fplot at 153
fplot('log(x)+asin(x)',1)
??? Attempted to access lims(:,1); index out of
bounds because numel(lims)=1.

Error in ==> fplot at 96
xmin = min(lims(1:2)); xmax = max(lims(1:2));

clear
clc
f=inline('x^2-(1/(3*x^2-1))-log10(x)-3',[0.1 5])
??? Subscript indices must either be real positive
integers or logicals.

Error in ==> inline.display at 19
line2 = sprintf('%s%s)', line2,
deblank(obj.args(obj.numArgs,:)));

f=inline('x^2-(1/(3*x^2-1))-log10(x)-3')

f =

Inline function:
f(x) = x^2-(1/(3*x^2-1))-log10(x)-3

fplot(f,[0.1 5])
grid on
fplot(f,[0.1 5])
grid on
x=fzero(f,0.01)

x =

0.0100

diary off


Wyszukiwarka

Podobne podstrony:
Analiza Matematyczna 2 Zadania
ZARZĄDZANIE FINANSAMI cwiczenia zadania rozwiazaneE
ZADANIE (11)
zadanie domowe zestaw
W 4 zadanie wartswa 2013
Sprawdzian 5 kl 2 matematyka zadania
zadania1
Zadania 2015 9
Logika W8 zadania
Logika troch teorii zadania
06 Zadania z rozwiązaniamiidd47
zadania4
zadania 1 5 10

więcej podobnych podstron