.


:




:

































 

 

 

 


7 Matlab.




1. MatLab , . 0.2, 0.3, 0.5, 0.8, 1.3, 1.7, 2.5. . 1. - , . 2. y () - . - , . = [0.2 0.3 0.5 0.8 1.3 1.7 2.5] = 0.2000 0.3000 0.5000 0.8000 1.3000 1.7000 2.5000 = sin(x).^2./(l+cos(x))+exp(-x).*log(x) = -1.2978 -0.8473 -0.2980 0.2030 0.8040 1.2258 1.8764 , ^, / * ( ) sin(x) : = sin()^2/(1+())+exp(-x)*log(x)??? Error using ==> ^ Matrix must be square. , MatLab * ^ . , : = 0.2000 0.3000 0.5000 0.8000 1.3000 1.7000 2.5000 = -1.2978 -0.8473 -0.2980 0.2030 0.8040 1.2258 1.8764 , (). , y () [1, 2] 0.2. , , - = [1, 1.2, 1.4, 1.6, 1.8, 2.0] , . , 0.2, , 0.01, . MatLab , , .. . ( ). -. = [1, 1.2, 1.4, 1.6, 1.8, 2.0] = 1.0000 1.2000 1.4000 1.6000 1.8000 2.0000 = [1:0.2:2] = 1.0000 1.2000 1.4000 1.6000 1.8000 2.0000 = [ : : ] , , , = [1:0.2:1.9] = 1.0000 1.2000 1.4000 1.6000 1.8000 - , . : = [1.9:-0.2:1] = 1.9000 1.7000 1.5000 1.3000 1.1000 - . - , 0.5 0.1, -, : = [0:0.1:0.5]' = 0 0.1000 0.2000 0.3000 0.4000 0.5000 , , , , . , , : = [1:5] = 1 2 3 4 5 [0, 1] 0.05, : 1. - . 2. () . 3. - y. 4. . = [0:0.05:1]; = (-).*sin(10*x); = Columns 1 through 7 0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 Columns 8 through 14 0.3500 0.4000 0.4500 0.5000 0.5500 0.6000 0.6500 Columns 15 through 21 0.7000 0.7500 0.8000 0.8500 0.9000 0.9500 1.0000 = Columns 1 through 7 0 0.4560 0.7614 0.8586 0.7445 0.4661 0.1045 Columns 8 through 14 -0.2472 -0.5073 -0.6233 -0.5816 -0.4071 -0.1533 0.1123 Columns 15 through 21 0.3262 0.4431 0.4445 0.3413 0.1676 -0.0291 -0.2001 - x y , , . y , , . (columns 1 through 7), - (columns 8 through 14), , , - (columns 15 through 21). . 2. 2.1. MatLab . , [0, 1]. : 1. . 2. y (). 3. plot . ( plot , . . ). x = [0:0.05:1]; = exp(-x).*sin(10*x); plot(x, ) Figure No. 1 . , . , . . MatLab , . , . plot (x(i), y(i)) , . MatLab , . . y () [0, 1], .. : = [0:0.01:1]; = (-).*sin(10*x); plot(x, ) . , . , [-1, -0.3] , : x = [-1:0.005:-0.3]; f = sin(x.^-2); g = sin(1.2*x.^-2); plot(x, f, x, g) . MatLab , . , : x1 = [-1:0.005:-0.3]; f = sin(x1.^-2); x2 = [-1:0.005:0.3]; g = sin(1.2*x2.^-2); plot(x1, f, x2, g) plot : , , . 1 plot - - " ", .. . plot , . , . , . plotyy, , . , , : = [0.5:0.01:3]; f = .^-3; F = 1000*(+0.5).^-4; plotyy(x, f, x, F) , . plot . MatLab . 2.2. : - loglog ( ); - semilogx ( ); -semilogy ( ). loglog, semilogx semilogy , plot, . , , [0.1, 5] : = [0.1:0.01:10]; f = log(0.5*x); g = sin(log(x)); semilogx(x, f, x,g) 2.3. . , , (, , - ..). MatLab , plot, loglog, semilogx semilogy, , . , : , . , , . .
y . -
m o :
c -. -
r + "" --
g *    
b s    
w d    
k v    
    ^    
    <    
    >    
    p    
    h    

, , , - , plot(x, f, 'r.', , g, 'k:').





:


: 2016-12-18; !; : 1360 |


:

:

, .
==> ...

1667 - | 1419 -


© 2015-2024 lektsii.org - -

: 0.008 .