MathWorks Interview Question

Difference between Sub function and nested function