Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
For an application of Motzkin paths with matrix weights, see Paul Monsky, Generating Functions Attached to some Infinite Matrices, Electronic J. Combinatorics, Volume 18, Issue 1 (2011), Paper #P5, combinatorics.org/ojs/index.php/eljc/article/view/v18i1p5.