Simultaneous measurement of refractive index and temperature based on intensity demodulation using matching grating method.