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.
Possible question:
I have an array A of n R,G,B triplets. It is a 3xn matrix. I have another array B in the form 1xn which stores an index value (association to a cluster) for each triplet.

How do I plot the triplets of A in 3D space (using `plot3` function), coloring each triplet according to its index in B? (The goal is to qualitatively evaluate my clustering)

Really, really good programmers who are MATLAB novices won't be able to give you an efficient (== MATLAB style) solution. However, it is a very simple problem if you do know your MATLAB.