Everything can be scripted in MLR without any interaction with the GUI. Scripting can be as simple as writing a quick function to perform all the analysis steps that you typically run on a retinotopy experiment or your event-related experiment. In other cases, scripting may be the way that you run a much more complex analysis like fully analyzing an adaptation experiment or a classification experiment. The goal of MLR is to make these tasks easy by providing a Matlab interface to your data. MLR takes care of all the book-keeping and alignment of data, etc., and you simply write the parts of your analysis that are specific to your particular experiment. MLR also makes it easy to interface with the GUI once you have your analysis by giving you functions to display overlays and write your own interrogator functions which can display your voxel-by-voxel results in any way that makes sense for your particular experiment. The best way to get started with scripting is to look at some of the examples we have in this section.
The following is a partial list of programming conventions. These are listed here to make your life easier. If you follow these conventions your programs will work better and work consistently with future releases of MLR. So, pay attention!
v = newView; ... do some stuff ... deleteView(v);
Also, you might want to call the view variable v instead of view, since view is a built-in matlab function.
viewGet([],'scan','help');
Also, whenever you viewSet something, make sure to set the return argument:
v = viewSet(v,'someParameter',newParameterSetting);
scanNums = viewGet(v,'scanNumFromDescription','wedges','Raw');
Also keep in mind that if you are writing a true analysis function then you will have to provide (or use the default) reconcile functions which handle keeping track of which overlay goes with what scan by comparing the filenames of the scans. In MLR scan filenames should always be unique to each scan.