slash = "/"; if (operatingsystem == "windows") {slash = "\\";} ######################################### # Set constants mkm = 1e-6; groupscope("::model"); select("FDTD"); min_mesh_step=get("min mesh step"); select("sub-Au"); sub_Au_z_max = get("z max"); ######################################### # Get FDTD material data #groupscope("::model::mon"); min_f = getglobalmonitor("minimum frequency"); max_f = getglobalmonitor("maximum frequency"); fpoints = getglobalmonitor("frequency points"); fvec=linspace(min_f,max_f,fpoints); #Au_name = "Au (Gold) - Johnson and Christy Copy 2"; Au_name = "Au-McPeak"; n_fdtd=getfdtdindex(Au_name,fvec,min_f,max_f); #n_fdtd; ######################################### format long; #z_arr = [5, 20]; ######################################### monitor_name = "monitor_1"; mon1_E = getresult(monitor_name, "E"); mon1_H = getresult(monitor_name, "H"); monitor_name = "monitor_2"; mon2_E = getresult(monitor_name, "E"); mon2_H = getresult(monitor_name, "H"); lambda = mon1_E.lambda; z = mon1_E.z; dippower = dipolepower(mon1_E.f); vacpower = sourcepower(mon1_E.f); name_base = filebasename(currentfilename)+"."+fileextension(currentfilename)+".1D.results"; matlabsavelegacy(name_base);