Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
01d992a01a17f899b847788eb97605ae |
User & Date: | gawthrop@users.sourceforge.net on 2000-07-05 15:20:55 |
Other Links: | branch diff | manifest | tags |
Context
2000-07-13
| ||
07:18:52 | Added optional par argument check-in: 2161bb4a26 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2000-07-05
| ||
15:20:55 | Initial revision check-in: 01d992a01a user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2000-05-22
| ||
12:37:24 | *** empty log message *** check-in: 8d35ceaca4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/m/mtt2sys.m version [25db5c7c1c].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | function sys = mtt2sys (Name) ## usage: sys = mtt2sys (Name) ## ## Creates a sys structure for the Octave Control Systems Toolbox ## from an MTT system with name "Name" ## Assumes that Name_sm.m and Name_struc.m exist ## Copyright (C) 2000 by Peter J Gawthrop if nargin<1 error("missing system name, usage: sys = mtt2sys (Name)"); endif ## Function names numpar_name = sprintf("%s_numpar",Name); sm_name = sprintf("%s_sm",Name); struc_name = sprintf("%s_struc",Name); ## Check files exist if exist(numpar_name)!=2 error("File %s.m does not exist: use <mtt %s numpar m> to create it",\ numpar_name,Name); endif if exist(sm_name)!=2 error("File %s.m does not exist: use <mtt %s sm m> to create it",\ sm_name,Name); endif if exist(struc_name)!=2 error("File %s.m does not exist: use <mtt %s struc m> to create it",\ struc_name,Name); endif eval(sprintf("par=%s_numpar;", Name)); # Parameters eval(sprintf("[A,B,C,D]=%s_sm(par);", Name)); # State matrices sys = ss2sys(A,B,C,D); # Sys form eval(sprintf("[sys.inname,sys.outname,sys.stname]=%s_struc;", Name)); # Setup names endfunction |