.


:




:

































 

 

 

 


MatLab




1

,

 

MatLab. , .

 

(1.1)

;

;

;

, .

, ( ), (1.1) .

(1.2)

(1.2) (1.1)

(1.3)

(1.3) . .

(1.4)

(1.2)

(1.5)

(1.5) (1.4) , ,

(1.6)

1.1.

. (1.7)

(1.6) (1.7)

(1.8)

MatLab.

 

!

1) MatLab, , , .

2) , , , .

3) m- MatLab.

4) MatLab , , x X .

5) , .

6) .

MatLab

(1.6) MatLab , , , , .

MatLab FileNewScript.

1.1.

1.1.

function dx=model1(t,x)

dx=zeros(3,1);

y=1;

dx(1)=x(2);

dx(2)=x(3);

dx(3)=1/2*(6*y-3*x(3)-4*x(2)-5*x(1));

, , model1.m .

1.1 (1.8) 1.1. , model1, dx. t x.

1.1 dx, - ( ). , .

1.1 (1.8). .

(Command Window) MatLab.

, FileNewScript.

1.2.

1.2.

T=30;

X0=[0,0,0];

options=odeset('AbsTol',[1e-5,1e-5,1e-5],'RelTol',1e-5);

[t,x]=ode45('model1',[0,T],X0,options);

plot(t,x(:,1),'b-',t,x(:,2),'g--','LineWidth',2);

legend('x_1(t)','x_2(t)');

grid on;

xlabel('t, c');

ylabel('x_i(t)');

title(' y=1 [0,0,0]');

annotation('arrow',[0.13 0.13],[0.13 0.95], 'HeadStyle', 'plain')

annotation('arrow',[0.11 0.92],[0.11 0.11], 'HeadStyle', 'plain')

, , lab1.m .

, . . options , , , .

ode45, - 4-5 . , . . Workspace MatLab, . . ,

t

x

size(x)

, .

plot ( b-) ( g--). , , 2 .

. legend . grid on . xlabel ylabel . title . .

, F5 Run MatLab. .

, . , MatLab , . , .

. EditCopy Options. Clipboard formatPreserve information (metafile if possible) Figure background colorTransparent background.

EditCopy Figure , , Microsoft Word, .

 

1.1

                   
                   
                   
              0,5 0,5  
                0,5  
            - - - -
  2,5 7,5              
                   
                   
                   
              0,5 0,5  
                0,5  
            - - - -
                   
                   
                   
                   
              0,5 0,5  
                0,5  
            - - - -
  2,5 7,5              

 

1.2

                   
                   
                   
0,5 -0,2 -0,5 0,3 -0,5 0,5 0,4 1,5 -0,5 0,5
  0,2 0,5 -0,5     - - - -
                   
                   
  -1   1,5 1,5 -1     -1 1,5
  -2 -1 0,5 -0,5 0,5 0,5 -1 0,5 -0,5
0,5 0,2 0,4 -1   0,5 - - - -
                   
                   
0,5 0,5 0,5 -0,5 -0,5 -0,5 0,5 0,5 -0,5 -0,5
-0,5 -0,5 -1   -0,5 0,5 1,5 -1 -0,5 1,5
      -1 1,5   - - - -

 

1.5.1. MATLAB (. ).

1.5.2. (. . 1.1) (1.1).

1.5.3. (1.6).

1.5.4. MatLab, m- 1.3 ( 1.1 1.2).

1.5.5. :

) . . . . , . . , .

) . . 1.2. ( ode45, title). . .

) ( , y=1; y=sin(t);). ( ode45, title). . . .

) . ( ode45, title). . . .

1.5.6. 1.6.

1.5.7. , 1.7 , .

 

:

1.6.1. , , ... , , ... , ,

1.6.2. .

1.6.3. .

1.6.4. .

1.6.5. .

1.6.6. .

1.6.7. , .

1.6.8. .

 

1.7.1. ? ?

1.7.2. ?

1.7.3. ode45?

1.7.4. ?

1.7.5. ? ?

1.7.6. ?

1.7.7. ? ?

1.7.8. ?


2

 

.

 





:


: 2017-04-14; !; : 785 |


:

:

,
==> ...

978 - | 887 -


© 2015-2024 lektsii.org - -

: 0.045 .