RawDog (Rigorous Analysis of Wave Diffraction On Gratings) is a MATLAB application providing calculations for reflection and transmission coefficients (diffraction efficiencies) of periodic structures (such as optical gratings, photonic crystals, etc.) based on the Rigorous Coupled Wave Analysis (RCWA).
RawDog is a completely free application (in contrast, most commercial softwares cost thousands of euros) with additional features.
UPDATE 2: RawDog goes Open Source - RawDog Source Code
UPDATE: Now you have the FULL version of RawDog for FREE! Enjoy! :)