other values are waste of space as you are storing bunch of zeros.This will reduce the computation speed too. Can you find any Matlab command that only stores nonzero values, so that you save some space? When any EM wave propagates through multilayered micro structures, we can find the E & H field (for x, y, z) using eigenvalue and eigenvector. To do so, what we do, write Maxwell's equations in the matrix form (like you generated a matrix in question 1) and then find the eigenvalue and eigenvector of those matrix. For example, after solving the Maxwell’s matrix equation, I got the following eigenvectors (W) and eigenvalues ( 2 ). [For this lab document, image credit goes to Dr.Raymond C. Rumpf, Professor, University of Texas, El Paso] These eigenvectors represent the electromagnetic modes propagating through the micro structures and corresponding eigenvalue represents the propagation constant. Here, mode means the orientation of E & H fields. Look at the following picture. You will understand.

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6