MathWorks interview question

All questions were simple