MathWorks Interview Question

already mentioned everything above