Facebook
From ja, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 189
  1. > restart;
  2. > with(plots);
  3.  
  4.  
  5. > u:=0;
  6.  
  7.  
  8.  
  9. > r1:=diff(x1(t),t)=-2*x1(t)+x2(t);
  10.  
  11.                    
  12.                        
  13.  
  14. > r2:=diff(x2(t),t)=2*x1(t)+3*x2(t);
  15. >
  16.  
  17.                  
  18.  
  19. > wp:=x1(0)=0.5,x2(0)=5.5;
  20.  
  21.                    
  22.  
  23. > Gw:=dsolve({r1,r2,wp},{x1(t),x2(t)},type=numeric);
  24.  
  25.                  
  26.  
  27. > odeplot(Gw,[[t,x1(t)],[t,x2(t)]],0..10);
  28.