How Can I do simulation for TCM in Matlab?