I want to plot a graph with wavelength on the x axis but when i input the wavelength values I convert them to meters for the calculation of y axis values. Is there a way to have the wavelength values in nm without adding a second matrix? This is what I have
theta = 10wavelength_m = [500e-09:10e-09:700e-09]wavelength_nm = [500:10:700]m = 1d = (m.*wavelength_m)/sin(theta)spatial_frequency = 1./dplot(wavelength_nm,spatial_frequency,"r--")xlabel("Wavelength (nm)")ylabel("Spatial Frequency (/m)")
Best Answer