Using MATLAB, complete the following tasks. Be sure to clearly describe any systems, state any assumptions. Include all code and outputs, using comments to clarify important details.

a) Create a script to calculate the factorial of a given number.
b) Implement a loop to find the roots of a quadratic equation.
c) Generate a random matrix and find its eigenvalues.
d) Plot a sine wave with appropriate labels and title.