Overview
Comment:Now always checks dependencies if parameter arg not given
Also generates sympar as well
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 67469e351530abbc44c3e4e5fd30080b49ffd4c6d97606d29c076e0a8b281ec5
User & Date: gawthrop@users.sourceforge.net on 2000-09-19 09:53:18
Other Links: branch diff | manifest | tags
Context
2000-09-19
11:14:30
Now writes the first component type header correctely check-in: e22fc5845e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:53:18
Now always checks dependencies if parameter arg not given
Also generates sympar as well
check-in: 67469e3515 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:39:38
No check on file existence - let mtt do its dependency check check-in: 2693f82321 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/mtt2sys.m from [83b5c5e7a0] to [a36fac3658].

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
48
49
50
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







-
-
-
-
-
+
+
+
+
+



-
-
-
-
+
-

-
-
-
-
+
+
+
+
+
-
-
-
-
+
+

-
+
-
-
-
-
-
+
+
+
+
+
+
+







  ## Assumes that Name_sm.m, Name_struc.m and Name_numpar.m exist

  ## Copyright (C) 2000 by Peter J Gawthrop


  if nargin<1
    error("missing system name, usage:  sys = mtt2sys (Name)");
    else
      ## Create function names
      numpar_name = sprintf("%s_numpar",Name);
      sm_name = sprintf("%s_sm",Name);
      struc_name = sprintf("%s_struc",Name);
  else
    ## Create function names
    numpar_name = sprintf("%s_numpar",Name);
    sm_name = sprintf("%s_sm",Name);
    struc_name = sprintf("%s_struc",Name);
  endif

  if nargin<2			# Use predefined parameters
    if exist(numpar_name)!=2	# Check file exists
#       error("File %s.m does not exist: use <mtt %s numpar m> to create it",\
# 	    numpar_name,Name);
      mtt(Name,"numpar");
    mtt(Name,"numpar");
    endif
    eval(sprintf("par=%s_numpar;", Name)); # Parameters
  endif
  
  ## Check files exist
  if exist(sm_name)!=2
    mtt(Name,"sm");		# Create state matrices
    mtt(Name,"struc");		# Create structure info
    mtt(Name,"sympar");		# Create sympar details
  else				# Only create other file if not there
    if  exist(sm_name)!=2
#     error("File %s.m does not exist: use <mtt %s sm m> to create it",\
# 	  sm_name,Name);
      mtt(Name,"sm");
  endif
      mtt(Name,"sm");		# Create state matrices
    endif

  if exist(struc_name)!=2
    if  exist(struc_name)!=2
#     error("File %s.m does not exist: use <mtt %s struc m> to create it",\
# 	  struc_name,Name);
      mtt(Name,"struc");
  endif
  
      mtt(Name,"struc");	# Create state matrices
    endif

  endif
  


  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



MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]