function nm = hz2nm(hz) m = (299792458 ./ hz); %wavelength in meter nm = m .* 10^9; end