MathWorks interview question

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