I\'m writing a MATLAB program for solving the positive z and negative z traveling waves in a multiple region problem. The user chooses the number of layers to be N, and assu