Check this repository to understand simulation: here
Difference between previous repository and this is draw a diferent drawing rest all are same only some changes in MATLAB code
Difference in MATLAB code -
Scale factor for drawing is different than previous repository simulation (here )