closeall; # retrieve Hz(t) from the simulation and use czt to get Hz vs f. Hz = getdata("time_through","Hz"); t = getdata("time_through","t"); f = linspace(c/1.58e-6,c/1.5e-6,1000); # frequency vector Hzf = czt(pinch(Hz),t,2*pi*f); Hzf2 = abs(Hzf)^2; Hzf2=Hzf2/max(Hzf2); plot(c/f*1e6,10*log10(Hzf2),"Wavelength (microns)","Intensity (dB)");