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: a5d4951856ce773bb0afa3a7d7385f37b530c5a68f92ecd7c5dac9fdd84b27d4
User & Date: gawthrop@users.sourceforge.net on 2000-04-07 13:55:10
Other Links: branch diff | manifest | tags
Context
2000-04-07
19:02:18
*** empty log message *** check-in: 84f70ab7a2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:55:10
Initial revision check-in: a5d4951856 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:38:13
New mtt_getsize to replace bc check-in: 56555dc0b2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/m/rc_sim.m version [64c6ac3830].



































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
function [y,x] = rc_sim(mttx_0,mttU,mttT,MTTpar);

  ## Initialise
  [MTTu]  = zero_input(1);	# Zero the input

  [MTTx] = mttx_0;	        # Read in initial state

  N = length(mttT);
  Nx = length(mttx_0);

  y = zeros(1,N);
  x = zeros(Nx,N);

  mttdt = mttT(2)-mttT(1);
  for i = 1:N
    MTTt = mttT(i);
    MTTu = mttU(i);
    [MTTy] = rc_cseo(MTTx,MTTu,MTTt,MTTpar);    # Output 
    y(1,i) = MTTy;
    x(:,i) = MTTx;
    if 1>0			# Dont if no states
      [MTTdx] = rc_cse(MTTx,MTTu,MTTt,MTTpar); # State derivative
      [mttAA] = rc_smxa(MTTx,MTTu,mttdt,MTTpar);	# (I-Adt)
      [mttAA] = reshape(mttAA,Nx,Nx);
      [mttAAx] = rc_smxax(MTTx,MTTu,mttdt,MTTpar);	# (I-Adt)x
      [MTTopen] = rc_switchopen(MTTx);        # Open switches
      [MTTx] = mtt_implicit(MTTx,MTTdx,mttAA,mttAAx,mttdt,1,MTTopen); # Implicit update
    else 
    endif;			# 1>0

  endfor;				# Integration loop

endfunction


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