; START OF PROGRAM vs=100.0 & nr=801 & dp=1./(nr-1.) & p=findgen(nr)*dp ;------------- ; PARAMETER: ; vs=vector/scalar speed ;------------- ; Speedup: r=1./(1.-p+p/vs) ; loop to replot the result (in case of interactive parameter changes or ; generationof postscript files) again='y' & withps='n' & contin='y' while again eq 'y' do begin ; some settings for postscript print, 'With postscript?' read, withps if withps eq 'y' then begin set_plot,'ps' device,filename='nsimhw01.ps' device,/inches,xsize=8.,scale_factor=1.0,xoffset=0.5 device,/inches,ysize=10.0,scale_factor=1.0,yoffset=0.5 device,/times,/bold,font_index=3 endif ;actually plot something !P.REGION=[0.,0.,1.0,1.25] print, 'plot page?' read, contin if (contin eq '' or contin eq 'y') then begin !P.CHARSIZE=1 !P.MULTI=[0,0,1] !P.POSITION=[0.1,0.35,0.9,0.8] amax = (max(r)) amin = (min(r)) plot_io, p, r,$ title='Speedup T_s/T_v',xtitle='p',$ font=3, yrange=[amin, amax], ystyle=1, line=0 endif ;doit again? print, 'again?' read, again ;close postscript device if not needed if withps eq 'y' then device,/close set_plot,'x' endwhile end