Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
29
Добавлен:
17.04.2013
Размер:
4.94 Кб
Скачать
help

HELP topics:

e:\matlab - Establish MATLAB session parameters.
matlab\general - General purpose commands.
matlab\ops - Operators and special characters.
matlab\lang - Language constructs and debugging.
matlab\elmat - Elementary matrices and matrix manipulation.
matlab\specmat - Specialized matrices.
matlab\elfun - Elementary math functions.
matlab\specfun - Specialized math functions.
matlab\matfun - Matrix functions - numerical linear algebra.
matlab\datafun - Data analysis and Fourier transform functions.
matlab\polyfun - Polynomial and interpolation functions.
matlab\funfun - Function functions - nonlinear numerical methods.
matlab\sparfun - Sparse matrix functions.
matlab\plotxy - Two dimensional graphics.
matlab\plotxyz - Three dimensional graphics.
matlab\graphics - General purpose graphics functions.
matlab\color - Color control and lighting model functions.
matlab\sounds - Sound processing functions.
matlab\strfun - Character string functions.
matlab\iofun - Low-level file I/O functions.
matlab\demos - Demonstrations and samples.

For more help on directory/topic, type "help topic".


» diary
» a=100

a =

100

» b=400

b =

400

» h=5

h =

5

» n=5

n =

5

» i=0:4

i =

0 1 2 3 4

» x=0.5*((b-a)*(cos((2*i+1)*3.14)/2*n+2)+b+a)


x =

175.0005 175.0043 175.0119 175.0233 175.0385

» k=100:5:400

k =

Columns 1 through 12

100 105 110 115 120 125 130 135 140 145 150 155

Columns 13 through 24

160 165 170 175 180 185 190 195 200 205 210 215

Columns 25 through 36

220 225 230 235 240 245 250 255 260 265 270 275

Columns 37 through 48

280 285 290 295 300 305 310 315 320 325 330 335

Columns 49 through 60

340 345 350 355 360 365 370 375 380 385 390 395

Column 61

400

» xhat=k

xhat =

Columns 1 through 12

100 105 110 115 120 125 130 135 140 145 150 155

Columns 13 through 24

160 165 170 175 180 185 190 195 200 205 210 215

Columns 25 through 36

220 225 230 235 240 245 250 255 260 265 270 275

Columns 37 through 48

280 285 290 295 300 305 310 315 320 325 330 335

Columns 49 through 60

340 345 350 355 360 365 370 375 380 385 390 395

Column 61

400

» yhat = newt(x,sqrt(x),xhat)

yhat =

Columns 1 through 7

10.9738 10.9854 11.0367 11.1219 11.2354 11.3721 11.5275

Columns 8 through 14

11.6974 11.8782 12.0664 12.2594 12.4548 12.6507 12.8455

Columns 15 through 21

13.0384 13.2288 13.4164 13.6018 13.7856 13.9691 14.1540

Columns 22 through 28

14.3424 14.5370 14.7406 14.9569 15.1898 15.4436 15.7232

Columns 29 through 35

16.0338 16.3813 16.7717 17.2116 17.7083 18.2692 18.9022

Columns 36 through 42

19.6158 20.4189 21.3208 22.3313 23.4606 24.7193 26.1187

Columns 43 through 49

27.6702 29.3859 31.2782 33.3601 35.6449 38.1465 40.8791

Columns 50 through 56

43.8575 47.0967 50.6125 54.4209 58.5383 62.9818 67.7687

Columns 57 through 61

72.9170 78.4449 84.3713 90.7152 97.4964

» r=sqrt(xhat)-yhat

r =

Columns 1 through 7

-0.9738 -0.7384 -0.5486 -0.3981 -0.2809 -0.1918 -0.1258

Columns 8 through 14

-0.0785 -0.0460 -0.0248 -0.0120 -0.0049 -0.0016 -0.0003

Columns 15 through 21

0.0000 0 0.0000 -0.0003 -0.0015 -0.0049 -0.0119

Columns 22 through 28

-0.0246 -0.0456 -0.0778 -0.1245 -0.1898 -0.2779 -0.3935

Columns 29 through 35

-0.5419 -0.7288 -0.9603 -1.2429 -1.5838 -1.9903 -2.4705

Columns 36 through 42

-3.0327 -3.6857 -4.4389 -5.3019 -6.2850 -7.3988 -8.6544

Columns 43 through 49

-10.0634 -11.6376 -13.3896 -15.3323 -17.4790 -19.8435 -22.4400

Columns 50 through 56

-25.2833 -28.3885 -31.7711 -35.4472 -39.4333 -43.7464 -48.4038

Columns 57 through 61

-53.4234 -58.8235 -64.6228 -70.8406 -77.4964

» plot(xhat,r)
» diary off
» help diary

DIARY Save the text of a MATLAB session.
DIARY file_name causes a copy of all subsequent terminal input
and most of the resulting output to be written on the named
file. DIARY OFF suspends it. DIARY ON turns it back on.
DIARY, by itself, toggles the diary state.

»