Question: I programmed in [MATLAB](http://www.mathworks.com/) for many years, but switched to using R exclusively in the past few years so I'm a little out of practice. I'm interviewing a candidate today who describes himself as a MATLAB expert. 

What MATLAB interview questions should I ask?

Some other sites with resources for this:

* ["Matlab interview questions" on Wilmott](http://www.wilmott.com/messageview.cfm?catid=10&threadid=51640)
* ["MATLAB Questions and Answers" on GlobaleGuildLine](http://www.globalguideline.com/interview_questions/Questions.php?sc=MATLAB_Interview_Questions_and_Answers)
* ["Matlab Interview Questions" on CoolInterview](http://www.coolinterview.com/type.asp?iType=453)

Answer: 
Ask questions about his expertise and experience in applying [MATLAB](http://en.wikipedia.org/wiki/MATLAB) in your domain.

Ask questions about how he would approach designing an application for implementation in MATLAB. If he refers to recent features of MATLAB, ask him to explain them, and how they are different from the older features they replace or supplement, and why they are preferable (or not).

Ask questions about his expertise with MATLAB data structures. Many of the MATLAB 'experts' I've come across are very good at writing code, but very poor at determining what are the best data structures for the job in hand. This is often a direct consequence of their being domain experts who've picked up MATLAB rather than having been trained in computerism. The result is often good code which has to compensate for the wrong data structures.

Ask questions about his experience, if any, with other languages/systems and invite him to expand upon his observations about the relative strengths and weaknesses of MATLAB.

Ask for top tips on optimising MATLAB programs. Expect the answers: vectorisation, pre-allocation, clearing unused variables, etc.

Ask about his familiarity with the MATLAB profiler, debugger and [lint](http://en.wikipedia.org/wiki/Lint_%28software%29) tools. I've recently discovered that the MATLAB 'expert' over in the corner here had never, in 10 years using the tool, found the profiler.

That should get you started.
Depends a bit what you want to test. 

To test [MATLAB](http://en.wikipedia.org/wiki/MATLAB) fluency, there are several nice Stack Overflow questions that you could use to test e.g. array manipulations ([example 1](https://stackoverflow.com/questions/1903592/how-can-i-generate-the-following-matrix-in-matlab/1911977#1911977), [example 2](https://stackoverflow.com/questions/1846635/calculate-most-common-values)), or you could use fix-this problems like [this question](https://stackoverflow.com/questions/2462927/matlab-image-corner-coordinates-referncing-to-cell-arrays) (I admit, I'm rather fond of that one), or look into [this list](https://stackoverflow.com/questions/1710299/corner-cases-unexpected-and-unusual-matlab) for some highly MATLAB-specific stuff. If you want to be a bit mean, throw in a question like [this one](https://stackoverflow.com/questions/2142826/mapping-2-vectors-help-to-vectorize), where the best solution is a loop, and the typical MATLAB-way-of-thinking solution would just fill up the memory.

However, it may be more useful to ask more general programming questions that are related to your area of work and see whether they get the problem solved with MATLAB.

For example, since I do image analysis, I may ask them to design a class for loading images of different formats (a MATLAB expert should know how to do OOP, after all, it has been out for two years now), and then ask follow-ups as to how to deal with large images (I want to see a check on how much memory would be used - or maybe they know `memory.m` - and to hear about how MATLAB usually works with doubles), etc.