This is the template structure that I now use for projects in Matlab, always supported with git. Under scripts, I store the matlab scripts for running things, such as demo or batch of experiments. Under test I have the tests for important functions, especially gradient checking for optimization procedures. alltests.m has invocations for all of the tests written.
project/ libs/ data/ src/ test/ allTests.m scripts/ output/ .gitingore .git