Numerical investigation of photonic crystals by means of spectral and matrix of diffraction methods