Emeritus Prof. Peter Corke is a renowned robotics researcher. I recall borrowing his book, Robotics, Vision and Control, from the library. This book contains numerous MATLAB and Simulink examples.
He has a YouTube video demonstrating how to render the Puma 560 manipulator and provides the code in the description.
Some special functions require the installation of his open-source MATLAB toolboxes: Robotics Toolbox, Machine Vision Toolbox, and Spatial Math Toolbox (only this available in File Exchange). However, in the comments section (about 1 year ago), he also stated that he is no longer able to support this software and that his efforts are now focused on the Python version of the toolboxes.

