.


:




:

































 

 

 

 


. Matlab




Matlab

 

 

,

 

1) Matlab.

2) .

3) Matlab int(), trapz(), quad().

4) : , .

 

 

 

1) 2.3 (. 2.3.1).

2) . 2.3.2-1 .

3) int( S) int( S, x ), S , - .

4) int() int( S,a,b ), a, b .

5) Matlab, , - trapz(x, y), h .

6) Matlab, , quad('f',a,b), f , .

7) , .

8) clear all.

9) .

 

2.3.2-1

 

1 2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

 

1) :

,

2) () Command Window, .

1) Matlab ?

2) trap(x,y).

3) trap(x,y), y(x) ?

4) trap(x,y), - ?

5) Matlab ?

6) quad().

7) ?

2.4.

2.4.1.

2.4.2.

2.4.3.

2.4.1.

() , , .

, , , , . .

n- , : n- :

 

y = j(x) . x0, y0 [a;b] h ( ).

- [1]. . , , .

 

Matlab . , (): ode23() - ; ode45() - .

MatLab , , :

[x, y] = ode23('fun',t0,tf,x0)

[x, y] = ode45('fun',t0,tf,x0)

 

:

'fun' ( ) , (
y' = fun(x,y));

t0 ;

tf ;

0 .

 

:

x , ;

y , , - x.

 

Matlab . OPTIONS.

 

 

. 2.4.1-1. -

 

ode23() ode45() : [1;10] 1 y(1)=1. ode23() . 2.4.1-1.

. 2.4.1-2 , ode45(). y(x) (. 2.4.1-3).

 

. 2.4.1-2. -

 

 

. 2.4.1-3.

 

( ) , . , . , . .

: . . , , . : ( , ). . :

Matlab (. 2.4.1-4).

 

 

. 2.4.1-4.

 

( ) , y. y(1) y(x), y(2) y'(x). plot(x, y) (. 2.4.1-6).

 

 

. 2.4.1-5.

 

 

 

. 2.4.1-6.






:


: 2016-10-30; !; : 790 |


:

:

, , . , .
==> ...

1394 - | 1227 -


© 2015-2024 lektsii.org - -

: 0.03 .