https://ch.mathworks.com/matlabcentral/fileexchange/71478-mpsim?s_tid=prof_contriblnk
mpsim - File Exchange - MATLAB Central
Download and share free MATLAB code, including functions, models, apps, support packages and toolboxes
file exchangematlabcentral