Differences From Artifact [d1ee14d3a3]:

To Artifact [bb4d4bdb2d]:


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
function eqn = mtt_resolve_cr (eqn)
  ## usage:  eqn = mtt_resolve_cr (eqn)


  ###################################### 
  ##### Model Transformation Tools #####
  ######################################
  
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$



  ## Revision 1.1  2003/03/24 10:19:42  gawthrop
  ## Documentation added
  ##
  ###############################################################

  ## Temporary version to resolve lin only!

  ## How many equations here?
  N = length(findstr(eqn,"="));
  EQNS = split(eqn,";");

  eqn = "";
  for i = 1:N
      
      ## Split equation
      EQN = split(EQNS(i,:),":=");
      LHS = deblank(EQN(1,:));
      RHS = deblank(EQN(2,:));

      if index(RHS,"lin(")>0	# lin cr is here

      RHS = sprintf("%s;", RHS); # Put back ;














>
>
>









|





|







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
function eqn = mtt_resolve_cr (eqn)
  ## usage:  eqn = mtt_resolve_cr (eqn)


  ###################################### 
  ##### Model Transformation Tools #####
  ######################################
  
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$
  ## Revision 1.2  2003/03/24 12:20:28  gawthrop
  ## *** empty log message ***
  ##
  ## Revision 1.1  2003/03/24 10:19:42  gawthrop
  ## Documentation added
  ##
  ###############################################################

  ## Temporary version to resolve lin only!

  ## How many equations here?
  N = length(findstr(eqn,"="));
  EQNS = char(strsplit(eqn,";"));

  eqn = "";
  for i = 1:N
      
      ## Split equation
      EQN = char(strsplit(EQNS(i,:),":="));
      LHS = deblank(EQN(1,:));
      RHS = deblank(EQN(2,:));

      if index(RHS,"lin(")>0	# lin cr is here

      RHS = sprintf("%s;", RHS); # Put back ;


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