Overview
Comment:Checks for changed argument.
Handles frequency response.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 6b069517685b6f0908460186037357582933f68947454a01891f8264112e6e43
User & Date: gawthrop@users.sourceforge.net on 1996-08-15 11:55:30
Other Links: branch diff | manifest | tags
Context
1996-08-15
11:56:11
Does complex matrices. check-in: 07a11bc45d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:55:30
Checks for changed argument.
Handles frequency response.
check-in: 6b06951768 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:54:32
Now has optional initial condition. check-in: 681ad2aea9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

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

15
16
17
18
19
20
21



22
23
24
25
26
27
28
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31







+
+
+







# 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
## Arguments now passed via $1_args.m file
##
## Revision 1.7  1996/08/11 19:49:27  peter
87
88
89
90
91
92
93
94
95


96
97
98
99
100
101




102






103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
90
91
92
93
94
95
96


97
98
99
100
101



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
127







-
-
+
+



-
-
-
+
+
+
+

+
+
+
+
+
+







-
+







Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

EOF
  exit
fi

if [ "$1" = "clean" ] && [$2 = ""]; then
  echo 'Removing log, dvi and ps files'
  rm *.log *.dvi *.ps
  echo 'Removing log, dat, gdat, doc, dvi and ps files'
  rm -f *.log *.dat *.gdat *.doc *.dvi *.ps 
  exit
fi

# Save up the argument list in a file.
cat > macmic_args.m <<EOF
$4
# 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
%.dvi: %.tex
%.ps: %.dvi


#Create acausal bond graph figure using xfig 
$1_abg.fig:
	$FIG $1_abg.fig 

#Create empty files (with titles) if not already there
$1_lbl.txt:
176
177
178
179
180
181
182
183
184



185
186
187
188
189
190
191
186
187
188
189
190
191
192

193
194
195
196
197
198
199
200
201
202
203







-

+
+
+







#LaTex system summary
$1_sum.tex: $1_abg.pl
	abg2sum_pl2tex $1; latex_tidy $1_sum.tex

#Elementary system equations + definitions
$1_ese.r: $1_cbg.m
	   cbg2ese_m2r $1
 
$1_def.r: $1_ese.r
$1_def.m: $1_def.r
	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
257
258
259
260
261
262
263
264
265
266
267
268





269
270
271
272










273
274
275
276
277
278
279
280
281

282
283
284
285

286
287
288
289

290
291
292
293

294
295




296
297
298
299
300
301
302
303
304
305
306
307
308
309
310





311
312
313
314
315





316
317
318
319
320
321
322
269
270
271
272
273
274
275





276
277
278
279
280
281
282


283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300

301
302
303
304

305
306
307
308

309
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
338
339
340
341
342
343
344
345
346
347
348







-
-
-
-
-
+
+
+
+
+


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








-
+



-
+



-
+



-
+


+
+
+
+











-
-
-
-
+
+
+
+
+

-
-
-
-
+
+
+
+
+







	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 '$4'
$1_sr.m: $1_dm.m $1_numpar.m $1_args.m
	dm2sr_m $1 '$4'
$1_odesol.m: $1_ode.m $1_numpar.m $1_args.m
	ode2odesol_m $1 '$4'
	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.dat: $1_dm.m $1_numpar.m $1_args.m
	dm2fr_m2dat $1 '$4'
$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
$1_nifr.m: $1_fr.m
	touch $1_nifr.m

#Partially-known system indentification structure matrices
$1_pkim.r: $1_tf.r $1_sympar.r 
	tf2pkim_r $1; tidy $1_pki.r
$1_pkim.tex: $1_def.r $1_pkim.r $1_sympar.r
	pkim_r2tex $1; latex_tidy $1_pkim.tex

#Generic conversion of data files from m to dat format
%.dat: %.m
$1_$2.dat: $1_$2.m
	m2dat $1_$2

#Generic conversion of data files from dat to (gplot) gdat format
%.gdat: %.dat
$1_$2.gdat: $1_$2.dat
	dat2gdat $1_$2

#Generic conversion of Latex to latex document
%.doc: %.tex
$1_$2.doc: $1_$2.tex
	showtex $1 $2

#Generic conversion of LaTeX doc to dvi
%.dvi: %.doc
$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

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


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

#View a ps file
%.view: %.ps
	echo Creating view of $1_$2
	ghostview $1_$2.ps&
#View a gdat file
#%.view: %.gdat
#	echo Creating view of $1_$2
#	gdat2view $1_$2 '$ARGS'&
	

#Report generation
$1_rep.tex: $1_sum.tex $1_dae.tex $1_lbl.txt $1_sympar.r $1_cr.r \
            $1_abg.ps
	echo Creating $1_rep.tex 
	make_report $1 > $1_rep.tex


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