Matrix method for determining propagation characteristics of optical waveguides