Index: mttroot/mtt/bin/trans/make_sim ================================================================== --- mttroot/mtt/bin/trans/make_sim +++ mttroot/mtt/bin/trans/make_sim @@ -7,12 +7,13 @@ lang=$2 outfile=${sys}_sim.${lang} echo Creating $outfile + make_m() { -mtt_header ${sys} sim m > ${outfile} +mtt_header ${sys} sim m > ${outfile} cat >> ${outfile} <2 + ## Create time vector + [N,M] = size(y); + t = simpar.dt*[0:N-1]'; + endif; endfunction EOF } Index: mttroot/mtt/bin/trans/mtt_header ================================================================== --- mttroot/mtt/bin/trans/mtt_header +++ mttroot/mtt/bin/trans/mtt_header @@ -10,10 +10,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.40 2002/04/17 16:23:59 geraint +## Partial fix for [ 545113 ] zeros missing in c++. +## Fixes -oct by removing duplicate initialisation (-c is still outstanding). +## ## Revision 1.39 2002/04/15 10:54:31 geraint ## Statically declare outputs and initialise to zero. ## This is necessary to prevent spurious values from being output when no assignments are made (i.e. when "y(i) := 0 for all u" (Reduce:see NERO)). ## ## Revision 1.38 2001/07/23 23:43:15 gawthrop @@ -326,11 +330,11 @@ ;; sim) states=no; inputs=no; parameters=no; - output='y,x' + output='y,x,t' args='x0,par,simpar,u' ;; ssim) states=no; inputs=no;