MathWorks Interview Question

Asked me to write a prototype for a simple algorithm in any programming language