transmat function

transmat: Cross-wave transition matrix