Dear Bailin,
Â
I am not sure if it is not displayed correctly or it wasn't copied correctly but the for loop of the script should be the following:
for (i=1:length(lambda)) {
   if (lambda(i)        fom=fom+Ts(i,1,index_b,1);    } else {        fom=fom+Ts(i,1,index_rg,1);    } } I think the if condition was missing in my previous message for some reason.  Regarding your question, if you set the limits to 0.42um and 0.6um, and select 3 frequency points and enable the "use wavelength spacing" option as shown in the image I sent you, the three wavelengths that the simulation will run for will be 420nm, 510nm and 600nm (since they are equally spaced). If you needed more wavelengths or they were not equally spaced, you would need to use more frequency points in order to have higher resolution in the wavelength and then use the wavelength that would be closer to your target. Using more wavelengths though will increase the simulation time too.  Best regards, Afroditi