Data Analysis Software for Neurobiology using Matlab

Introduction

As part of an effort to make inexpensive and flexible biology lab instrumentation, we have written a Matlab program which:

We used Matlab because it is a flexible programming language which includes the abilities to:

Each program description is divided into two parts; program use and program internal structure. Obviously, you don't need to understand the program internals to use it, as long as nothing goes wrong.


Using the Program

If you want to use the program you must have a licensed copy of Matlab release 12. Later in the fall we expect to have a version which will run standalone without Matlab. You then need to download the program we wrote. Be sure that your Matlab 'path' includes the folder where you stored the program. If you are not sure use the SetPath... option in the File menu to investigate. This program is cycle and memory hungary. It may not work well on slow machines. I have tested on an 866 MHz P3 with 256 Meg of memory.

The GUI consists of three plotting axes and their related controls.

The three plots:

 


Program Internal Organization

The program is structured as a Matlab function. Persistant data is stored in the UserData area of the figure. The initial execution of the function from the command line initializes a bunch of variables and the GUI, then exits. At that point, the GUI is drawn in the figure window and all the GUI controls are waiting patiently for a user action. Control returns to the main function when the user triggers a GUI element, and hence a callback function. Each of the callbacks passes a string to the main function which is dispatched by a gigantic case statement to perform an action, perhaps modify the persistant data, then exit. Since the main function is not running most of the time, the Matlab command line stays active.