home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / r / rlab / CTB / lsimtest2 < prev    next >
Encoding:
Text File  |  1995-11-15  |  217 b   |  20 lines

  1. //
  2. // This routine tests the lsim routine
  3. //
  4.  
  5. rfile lsim
  6. rfile rem
  7.  
  8. A=[0,1;-10000,-4];
  9. B=[0;1];
  10. C=[1,0;0,1];
  11. D=[0;0];
  12. t=(0.0:10.0:0.1)';
  13.  
  14. period=4.0;
  15. u=(rem(t,period) >= period ./ 2);
  16.  
  17. pstart();
  18.  
  19. J=lsim(A,B,C,D,u,t);
  20.