Differences From Artifact [43681cce8e]:

To Artifact [5e19f4f312]:


153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170



171
172

173


174

175

176
177
178
179
180
181
182
183
184
185
186
  j=[];
  for i = 1:length(T_open)
    j = [j; find(T_open(i)*ones(size(t))==t)];
  endfor
  y_open = y(j,:);
  u_open = u(j,:);

  ##if extras.visual
    ## Plots
    gset grid; xlabel "Time (sec)"; title "${sys}"
    ty = [t y] ; 
    tu =  [t u]; 
  
    ty_open = [T_open y_open];
    tu_open = [T_open u_open];
  
    gplot  tu \
        title "u", tu_open with impulses title "Sample times"



    figfig("${sys}_u","eps");
  

    gplot  ty \


        title "y", ty_open with impulses title "Sample times"

    figfig("${sys}_y","eps");

  
    system("gv ${sys}_y.eps&");
    system("gv ${sys}_u.eps&");
  ##endif
endfunction

EOF
}

make_nppp_numpar() {
echo Creating ${nppp_numpar_file}







<
|
<
<
<
|
<
<
|
|
<
>
>
>
|
|
>
|
>
>
|
>
|
>
|
<
<
<







153
154
155
156
157
158
159

160



161


162
163

164
165
166
167
168
169
170
171
172
173
174
175
176
177



178
179
180
181
182
183
184
  j=[];
  for i = 1:length(T_open)
    j = [j; find(T_open(i)*ones(size(t))==t)];
  endfor
  y_open = y(j,:);
  u_open = u(j,:);


  ## Plots






    gset nokey
    gset format x "%i"

    gset format y "%4.1f"
    gset term fig monochrome portrait fontsize 20 size 20 20 metric \
	     thickness 4
    gset output "${sys}_nppp.fig"

    title("");
    grid;
    xlabel("Time (s)");
    ylabel("u");
    subplot(2,1,2); plot(t,u,'-',  T_open, u_open,"^");  
    grid;
    ylabel("y");
    subplot(2,1,1); plot(t,y,'-', T_open, y_open,"^"); 




endfunction

EOF
}

make_nppp_numpar() {
echo Creating ${nppp_numpar_file}
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
        ## Make the numpar stuff
        make_nppp_numpar;
	;;
    m)
        ## Make the code
        make_nppp;
	;;
    dat2)
	## The dat2 language (output data)
	make_dat2; 
	;;
    gdat)
        cp ${dat2_file} ${dat2s_file} 
	dat22dat ${sys} ${rep} 
        dat2gdat ${sys} ${rep}
	;;
    fig)
	gdat2fig ${sys}_${rep}
	;;
    ps)
	fig2dev -Leps ${sys}_${rep}.fig > ${sys}_${rep}.ps
	;;

    view)
	echo Viewing ${sys}_${rep}.ps
        gv ${sys}_${rep}.ps&







|
|







|
|
|







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
        ## Make the numpar stuff
        make_nppp_numpar;
	;;
    m)
        ## Make the code
        make_nppp;
	;;
    dat2|fig)
    ## The dat2 language (output data) & fig file
	make_dat2; 
	;;
    gdat)
        cp ${dat2_file} ${dat2s_file} 
	dat22dat ${sys} ${rep} 
        dat2gdat ${sys} ${rep}
	;;
#    fig)
#	gdat2fig ${sys}_${rep}
#	;;
    ps)
	fig2dev -Leps ${sys}_${rep}.fig > ${sys}_${rep}.ps
	;;

    view)
	echo Viewing ${sys}_${rep}.ps
        gv ${sys}_${rep}.ps&

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