Index: mttroot/mtt/lib/rep/nppp_rep.make ================================================================== --- mttroot/mtt/lib/rep/nppp_rep.make +++ mttroot/mtt/lib/rep/nppp_rep.make @@ -33,17 +33,14 @@ nppp_rep.sh ${SYS} view ${SYS}_nppp.ps: ${SYS}_nppp.fig nppp_rep.sh ${SYS} ps -${SYS}_nppp.fig: ${SYS}_nppp.gdat - nppp_rep.sh ${SYS} fig - ${SYS}_nppp.gdat: ${SYS}_nppp.dat2 nppp_rep.sh ${SYS} gdat -${SYS}_nppp.dat2: ${nppp_reps} +${SYS}_nppp.fig ${SYS}_nppp.dat2: ${nppp_reps} nppp_rep.sh ${SYS} dat2 ${SYS}_nppp.m: nppp_rep.sh ${SYS} m Index: mttroot/mtt/lib/rep/nppp_rep.sh ================================================================== --- mttroot/mtt/lib/rep/nppp_rep.sh +++ mttroot/mtt/lib/rep/nppp_rep.sh @@ -155,30 +155,28 @@ 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 + ## 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 } @@ -250,22 +248,22 @@ ;; m) ## Make the code make_nppp; ;; - dat2) - ## The dat2 language (output data) + 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} - ;; +# fig) +# gdat2fig ${sys}_${rep} +# ;; ps) fig2dev -Leps ${sys}_${rep}.fig > ${sys}_${rep}.ps ;; view)