Overview
Comment:DAE solution (experimental) included.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: c7c8b3075dac671f8790ab249f8995f3571844610248ed481e7093875b6b848d
User & Date: gawthrop@users.sourceforge.net on 1996-08-15 16:47:47
Other Links: branch diff | manifest | tags
Context
1996-08-16
06:36:03
Removed u from default arg list. check-in: 255ee14a9f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1996-08-15
16:47:47
DAE solution (experimental) included. check-in: c7c8b3075d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:46:06
Initial revision check-in: c38431afc2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/mtt from [151fe6a67b] to [1316a2f255].

15
16
17
18
19
20
21




22
23
24
25
26
27
28
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$




## Revision 1.10  1996/08/15 07:44:24  peter
## Now handles generic transformations using %.
##
## Revision 1.9  1996/08/14 09:16:08  peter
## Step response now goes through  m, dat and gdat conversions
##
## Revision 1.8  1996/08/12 20:19:52  peter







>
>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996.

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.11  1996/08/15 11:55:30  peter
## Checks for changed argument.
## Handles frequency response.
##
## Revision 1.10  1996/08/15 07:44:24  peter
## Now handles generic transformations using %.
##
## Revision 1.9  1996/08/14 09:16:08  peter
## Step response now goes through  m, dat and gdat conversions
##
## Revision 1.8  1996/08/12 20:19:52  peter
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
fi

# Save up the argument list in a file; but only if argument has changed
ARGS=$4;
cat > $1_args.new <<EOF
$ARGS
EOF

DIFF=$(diff -bq $1_args.m $1_args.new)

if [ -n "$DIFF" ]; then
  mv macmic_args.new macmic_args.m
fi

# This is the main mtt programme
 
make -s  -f -  $1_$2.$3 << EOF

# Cancel implicit rules I don't want







|



|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
fi

# Save up the argument list in a file; but only if argument has changed
ARGS=$4;
cat > $1_args.new <<EOF
$ARGS
EOF
touch $1_args.m
DIFF=$(diff -bq $1_args.m $1_args.new)

if [ -n "$DIFF" ]; then
  mv $1_args.new $1_args.m
fi

# This is the main mtt programme
 
make -s  -f -  $1_$2.$3 << EOF

# Cancel implicit rules I don't want
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
	def_r2m $1; matlab_tidy $1_def.m;


#Differential-algebraic equations
$1_dae.r:	$1_ese.r $1_cr.r $1_sympar.r
	ese2dae_r $1; tidy $1_dae.r
$1_dae.m: $1_def.r $1_dae.r  $1_sympar.r
	dae_r2m $1; matlab_tidy $1_dae.m
$1_dae.c: $1_def.r $1_dae.r  $1_sympar.r
	dae_r2c $1; c_tidy $1_dae.c
$1_dae.tex:	$1_dae.r $1_simp.r
	dae_r2tex $1; latex_tidy $1_dae.tex

#Constrained-state equations
$1_cse.r: $1_dae.r $1_def.r $1_sympar.r







|







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
	def_r2m $1; matlab_tidy $1_def.m;


#Differential-algebraic equations
$1_dae.r:	$1_ese.r $1_cr.r $1_sympar.r
	ese2dae_r $1; tidy $1_dae.r
$1_dae.m: $1_def.r $1_dae.r  $1_sympar.r
	dae_r2m $1; matlab_tidy $1_dae.m; matlab_tidy $1_daeo.m
$1_dae.c: $1_def.r $1_dae.r  $1_sympar.r
	dae_r2c $1; c_tidy $1_dae.c
$1_dae.tex:	$1_dae.r $1_simp.r
	dae_r2tex $1; latex_tidy $1_dae.tex

#Constrained-state equations
$1_cse.r: $1_dae.r $1_def.r $1_sympar.r
268
269
270
271
272
273
274
275
276
277
278
279
280


281
282
283
284
285
286
287
288
289
290
$1_tf.m: $1_def.r $1_tf.r
	tf_r2m $1; matlab_tidy $1_tf.m
$1_tf.tex: $1_def.r $1_tf.r $1_sympar.r $1_simp.r
	tf_r2tex $1; latex_tidy $1_tf.tex


#Time responses
$1_ir.dat: $1_dm.m $1_numpar.m $1_args.m
	dm2ir_m2dat $1 '$ARGS'
$1_sr.m: $1_dm.m $1_numpar.m $1_args.m $1_def.m
	dm2sr_m $1 '$ARGS'
$1_odesol.m: $1_ode.m $1_numpar.m $1_args.m $1_def.m
	ode2odesol_m $1 '$ARGS'



#Frequency responses
$1_fr.m: $1_dm.m $1_numpar.m $1_args.m
	dm2fr_m $1 '$ARGS'
$1_lmfr.m: $1_fr.m
	touch $1_lmfr.m
$1_lpfr.m: $1_fr.m
	touch $1_lpfr.m
$1_nyfr.m: $1_fr.m
	touch $1_nyfr.m







<
<




>
>


|







272
273
274
275
276
277
278


279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
$1_tf.m: $1_def.r $1_tf.r
	tf_r2m $1; matlab_tidy $1_tf.m
$1_tf.tex: $1_def.r $1_tf.r $1_sympar.r $1_simp.r
	tf_r2tex $1; latex_tidy $1_tf.tex


#Time responses


$1_sr.m: $1_dm.m $1_numpar.m $1_args.m $1_def.m
	dm2sr_m $1 '$ARGS'
$1_odesol.m: $1_ode.m $1_numpar.m $1_args.m $1_def.m
	ode2odesol_m $1 '$ARGS'
$1_daesol.m: $1_dae.m $1_numpar.m $1_args.m $1_def.m
	dae2daesol_m $1 '$ARGS'

#Frequency responses
$1_fr.m: $1_dm.m $1_numpar.m $1_args.m $1_def.m
	dm2fr_m $1 '$ARGS'
$1_lmfr.m: $1_fr.m
	touch $1_lmfr.m
$1_lpfr.m: $1_fr.m
	touch $1_lpfr.m
$1_nyfr.m: $1_fr.m
	touch $1_nyfr.m
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325





326
327
328
329
330
331
332
333
334
335
336
337
	showtex $1 $2

#Generic conversion of LaTeX doc to dvi
$1_$2.dvi: $1_$2.doc
	echo Creating $1_$2.dvi
	latex $1_$2.doc > /dev/null

#Create PostScript version of dat file
%.ps: %.gdat
	gdat2ps $1_$2 '$ARGS'

#Create PostScript version of fig files
%.ps : %.fig
	echo Creating $1_$2.ps
	fig2dev -Lps $1_$2.fig >$1_$2.ps






#Create PostScript version of dvi file
%.ps: %.dvi
	echo Creating $1_$2.ps
	dvips -o $1_$2.ps $1_$2


#View a ps file
$1_$2.view: $1_$2.ps
	echo Creating view of $1_$2
	ghostview $1_$2.ps&

#View a gdat file







<
<
<
<





>
>
>
>
>




<







314
315
316
317
318
319
320




321
322
323
324
325
326
327
328
329
330
331
332
333
334

335
336
337
338
339
340
341
	showtex $1 $2

#Generic conversion of LaTeX doc to dvi
$1_$2.dvi: $1_$2.doc
	echo Creating $1_$2.dvi
	latex $1_$2.doc > /dev/null





#Create PostScript version of fig files
%.ps : %.fig
	echo Creating $1_$2.ps
	fig2dev -Lps $1_$2.fig >$1_$2.ps


#Create PostScript version of dat file
%.ps: %.gdat
	gdat2ps $1_$2 '$ARGS'

#Create PostScript version of dvi file
%.ps: %.dvi
	echo Creating $1_$2.ps
	dvips -o $1_$2.ps $1_$2


#View a ps file
$1_$2.view: $1_$2.ps
	echo Creating view of $1_$2
	ghostview $1_$2.ps&

#View a gdat file


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