Behavior Research Methods, Instruments, & Computers 2000, 32 (2), 290-296

MATLAB and graphical user interfaces: Tools for experimental management

ERINM.HARLEY and GEOFFREY R. LOFTUS University ofWashington, Seattle, Washington

MATLAB is a convenient platform for the development and management of psychological experi­ ments because of its easy-to-use programming language, sophisticated graphics features, and statistics and optimization tools. Through implementation of the Brainard-Pelli Psychophysics Toolbox, the MATLAB user gains close temporal and spatial control over the CRT, while retaining the simplicity of an interpreted language conducive to rapid program development. MATLAB's abilities can be further utilized through easily programmable graphical user interfaces (GUIs). We illustrate how a GUI can serve as a powerful and intuitive tool for organizing and controlling all aspects of a psychological ex­ periment, including design, data collection, data analysis, and theory fitting.

We describe here three related topics: first, the use of forms, such as PSYSCOPE (Cohen, MacWhinney, Flatt, MATLAB in psychological research; second, the value of & Provost, 1993; Yee & Vaughan, 1999) and MEL graphical user interfaces (GUIs) in organizing and running (St. James & Schneider, 1991; Schneider, 1989), because experiments; and third, our implementation of one such it provides greater control over experimental design, al­ GUI within the MATLAB environment. lowing for the creation of entirely unique experiments. MATLAB also serves as a good alternative to low-level MATLABAND programming languages, such as C and PASCAL, be­ PSYCHOLOGICAL RESEARCH cause MATLAB's language is abstracted from the hard­ ware details and is generally easier to learn. As a result, Over the past few years, MATLAB (a product of The a MATLAB user receives the benefits ofa programming Math Works Inc.) has gained popularity as a means of language that is both conducive to rapid program devel­ running psychological experiments, particularly those opment and able to perform with the power and flexibil­ involving perception and cognition. MATLAB, which ity ofa low-level language (primarily through the addition stands for matrix laboratory, is a powerful platform for ofthe Psychophysics Toolbox, discussed below). high-performance mathematical computation and graph­ ical representation, whose basic data element is an N­ The Psychophysics Toolbox dimensional matrix (Hanselman & Littlefield, 1996). MATLAB is particularly useful for running sensory MATLAB's primary strength as a means for creating and and perceptual experiments, largely owing to an exten­ executing psychological experiments lies in its compre­ sive set of tools-the Psychophysics Toolbox;' written hensive package ofsuperior mathematical and graphical by Denis Pelli and David Brainard-that allows extremely tools. Within this single application, all ofthe following close temporal, spatial, and color-related control over CRT­ experimental tasks can be achieved: creation and manip­ based stimulus displays (Brainard, 1997; Pelli, 1997). ulation ofstimuli, design and execution ofthe experiment, Specifically, the toolbox provides access to the comput­ data collection, statistical analysis, fit ofcomplex theory er's display frame buffer and color lookup table, allows to data, and interactive graphical data display. synchronization of stimulus display with the vertical re­ MATLAB runs on Macintosh,' Windows, and trace, supports millisecond timing, and facilitates the col­ operating systems and includes both a programming lan­ lection ofobserver responses (Brainard, 1997). The tool­ guage and a large set ofmathematically oriented libraries.? box incorporates these features into a large collection of MATLAB serves as a good alternative to popular plat- stimulus-display routines that allow the user to store pre­ formed visual images (e.g., scenes, forms, text, or some combination ofthese) in the computer's memory and to The writing of this manuscript was supported by NIMH Grant MH4I637 to G.L. We thank David Brainard for enormous amounts of display these images at rates that are constrained only by help in understanding the Psychophysics Toolbox and MATLAB in gen­ the monitor's refresh rate. For example, on a Macintosh eral. The MATLAB code discussed in this article will be posted on E.H.'s G3 computer, a 400 X 400 pixel gray-scale image can be Web site (http://students.washington.edu/eharley/). Please e-mail either transferred from memory to the screen buffer in than of the authors for details. Correspondence concerning this article should be addressed to E. M. Harley, Department of Psychology, Uni­ 10 msec, thereby allowing a sequence ofsuch images (the versity of Washington, Seattle, WA 98195-1525 (e-mail: eharley@ number ofwhich is limited only by computer memory) to u.washington.edu). be displayed at the fastest possible rate.

Copyright 2000 Psychonomic Society, Inc. 290 MATLAB AND GRAPHICAL USER INTERFACES 291

The Psychophysics Toolbox has been used by re­ Like other programming platforms, MATLAB provides searchers to study a variety oftopics in the field ofpsy­ automatic formatting features, such as color coding of chology, including face and object recognition, psycho­ comments, , and key words, as well as indentation physical thresholds, color matching, visual search, of loops, thus increasing clarity and organization of pro­ categorization, motion detection, and perceptual learning. gramming code. The net effect ofsuch features, combined Later in this article, we will briefly discuss our use ofthe with MATLAB's simple and intuitive programming syn­ toolbox to display high- and low-pass filtered digit strings tax, is to allow someone with little or no prior program­ for very briefexposure durations. ming experience to quickly become a proficient MAT­ LAB programmer and to write sophisticated routines Tools for Data Analysis and Theory Fitting within a matter of weeks. MATLAB provides a wide range of functions for use in data analysis. For example, the optional Statistics Graphical User Interfaces Toolbox includes than 200 routines covering topics There are essentially three ways in which a user can including, but not limited to, descriptive statistics, prob­ communicate with the computer via MATLAB: through ability distributions, linear and nonlinear modeling, multi­ the Command Window, through the use of scripts and variate statistics, and hypothesis testing. MATLAB also functions, and through GUIs. provides graphing tools for the creation ofpresentation­ The Command Window is MATLAB's default I/O tech­ quality plots of various forms, including line, scatter, nique. As the name implies, it is a window into which any stem, pie, and box plots and bar graphs and histograms, as standard MATLAB commands or user-defined com­ well as three-dimensional contour, surface, and mesh plots mands, such as "2+2" or "answer = conv2 (mask, filter)," (with optional animation). can be typed. Although the Command Window is ade­ Experimenters in the field ofperception and cognition quate for accomplishing simple tasks, it is often useful to often wish to fit mathematical theory to their data. MAT­ create a file containing a list of such commands. These LAB's optional Optimization Toolbox provides the tools files are called scripts if they simply run a list of com­ necessary for fitting complex, nonlinear mathematical mands and functions if they accept input arguments models with a number offree parameters but no analytic and/or return output arguments. Both scripts and func­ solution. For a given data set, the optimization routines tions can be executed either directly from the Command the values ofthe free parameters that minimize some Window or from within other scripts or functions. To pro­ desired error function (e.g., the root-mean square error vide an example, a function that we wrote and use often between the data and the theory predictions). is called "ComputeContrast." It requires two input val­ ues, foreground color (FC) and background color (BC), MATLAB's Intuitive Programming Language and returns the contrast value calculated by the formula MATLAB incorporates a programming language that (FC - BC)/(FC + BC). is similar in structure to many common languages, such The third communication device, a GUI, provides an as FORTRAN, BASIC, PASCAL, and C. One element intuitive interface between the user and the program­ that makes MATLAB's language unique is that, as was ming language. A GUI allows the user to bypass MAT­ noted, it uses a matrix as its basic element. This property LAB commands altogether and, instead, to execute pro­ confers numerous benefits, one being the following: In gramming routines with a simple mouse click or keypress most programming languages, it becomes time consum­ (most common applications, such as Word and Photo­ ing and cumbersome to perform the same mathematical shop, as well as the Macintosh and Windows operating operation on a group of numbers, because the operation systems, are implemented as complex GUIs). No knowl­ must be repeated (generally via loops) for each number, edge ofMATLAB or computer programming is necessary one number at a time. The greater the dimensionality of for a user to successfully navigate a well-designed GUI; the data structure on which such operations are per­ indeed, from the user's perspective, the language under­ formed, the greater the number of embedded loops re­ lying the GUI is irrelevant. GUIs can range from simple quired. However, in MATLAB's programming language, question boxes prompting the user for a Yes/No response, data structures are construed as matrices, and almost any to more complex interfaces, an example ofwhich will be operation, be it as simple as adding 1 to each structure el­ provided below. MATLAB provides the user with intuitive ement or as complex as finding all elements ofa structure tools for easy construction ofGUIs; see Marchand (1999) that are less than 0, can be performed in a single step. Em­ for a detailed description of the GUI-creation tools pro­ bedded loops for these tasks are thus eliminated in MAT­ vided by MATLAB. LAB, saving the programmer time and cutting down on the length and complexity of programming routines. A USING GRAPHICAL USER INTERFACES second benefit of MATLAB's matrix-based language IN PSYCHOLOGICAL EXPERIMENTS pertains to the use and manipulation of images. Images are stored in MATLAB as matrices, and because ofthis, To illustrate the benefits of using GUIs in psychologi­ they can be quickly and easily manipulated or altered (e.g. cal experiments, we will describe a specific GUI created filtering, adding noise, reducing/increasing contrast, etc.) to accompany a visual perception experiment in our lab­ through matrix operations. oratory. 292 HARLEY AND LOFTUS

Example: The Filter Experiment Manipulation ofExperimental Parameters To provide the reader with a foundation for under­ From Within the Graphic User Interface standing and interpreting our example Gut, we will first Like the filter experiment that we use in our example, briefly describe the experiment for which the GUI was many experimental projects, particularly those involving created. The experiment, which we will call the filter ex­ sensation and perception, involve a series ofinterrelated periment, was designed to investigate certain kinds of data sets. For instance, a project to investigate the effects spatial-frequency filtering on perception and memory ofcontrast on information acquisition may involve a se­ for briefly presented digit strings (see, e.g., Olds & Engel, ries ofexperiments, each with varying values ofduration 1998; Parish & Sperling, 1991). Stimuli were randomly and contrast and, usually, involving choices ofother ex­ chosen four-digit strings presented in three spatial­ perimental parameters as well. Often, such experiments frequency conditions: normal (N), low spatial frequen­ act as pilot experiments, designed to map out the lay ofthe cies only (LSF), and high spatial frequencies only (HSF). perceptual land for individual observers before the main On a given trial, the following sequence of events oc­ experiment is designed and the final data collected. curred. First, a stimulus in one ofthe three spatial-filtering As the number of such data sets within a project conditions was presented at one of six exposure dura­ grows, it becomes increasingly difficult to change the tions; next, the observer attempted to recall the digits in experimental parameters in a systematic and/or optimal their correct order (guessing if necessary); and third, vi­ fashion, because such parameters are often embedded in sua and/or auditory feedback was provided. The pro­ the code of the relevant programs. Keeping track ofwhich grams used in the filter experiment were all written in data sets emerged from which observers also becomes MATLAB, utilizing standard MATLAB routines in con­ tedious as the number ofdata sets per observer increases. junction with the stimulus presentation routines in the A Gut is a useful tool for dealing with these problems, Brainard-Pelli Psychophysics Toolbox. since it can do double duty as a mini-database. Through its use, an experimenter can easily set, alter, and keep track of experimental parameters for multiple observers Organizing Multiple Data Sets within a single visual display.The design features used for Fourteen observers participated in the filter experiment these purposes that are implemented in our example GUI and produced a total of64 data sets (where a data set is a (see Figure 1) are the following. set ofexperimental trials, all involving the same experi­ Observer information. The area in the upper left sec­ mental parameter values). Three observers collected pilot tion ofour GUI's main window is devoted to observer in­ data during the developing stages of the experiment. formation and setup of data files. Here, all of the ob­ Three different observers collected data for the final four servers' initials are listed in a pop-up menu. Once a versions ofthe experiment (in which mask/ no mask and particular observer has been selected, information for low-pass filter size were varied). Finally, 8 observers col­ that observer is loaded, and the Gut is updated-that is, lected data to serve as practice for a follow-up experiment parameter values are displayed, and any existing data are and to determine the appropriate experimental parameters graphed in the Gut's graphical display. If, as is usually (contrasts, durations, etc.) to be used in that follow-up ex­ true, the observer under consideration has more than one periment. Although it might seem as if organizing all of data set, a specific data set can be called up with the "Se­ these observers and data sets, with their differing experi­ lected Data Set" pop-up menu, and again the Gut will be mental parameters, would be time consuming and com­ updated. In Figure 1, observer E.U. is selected; she has plicated, a Gut designed expressly for this experiment five existing data sets, ofwhich Data Set 2 has been se­ allows for simple control over the multiple data sets from lected for analysis. The various parameter values for this the multiple observers. data set are shown in the edit boxes along the left side of the GUI. This allows the experimenter to immediately see The Example what parameter values characterized Data Set 2 for ob­ The GUI created to accompany the filter experiment server E.U.4 consists oftwo windows: a main window, pictured in Fig­ Setup. If the experimenter wishes to establish a new ure 1, and a theory window, pictured in Figure 2, which data set for an observer, he or she does so by setting all we will discuss in turn. ofthe relevant experimental parameters to their desired The GUI's main window contains four major compo­ values and simply clicking on the push button labeled nents: observer information, setup, and stimulus preview; "Setup." This button calls a routine that creates a new data feedback options and data collection; data analysis, plot file for the observer with the current parameter settings. options, and graphical display; and escape from the main An important clarification must be made here about the window in the form ofeither a link to the theory window dual function of the GUI's editable parameter list. As or an exit button. We will describe each ofthese compo­ was just described, one function ofthe list is for the cre­ nents within the context oftheir contributions to the de­ ation ofnew data sets. The second function ofthe list is to sign, data collection, data analysis, and theory application indicate clearly to the experimenter what parameter val­ entailed in the filter experiment. ues were used in any existing data set. For example, when MATLAB AND GRAPHICAL USER INTERFACES 293

Feedback: o Auditory Observer IDitials: I ED ... I IiI Visual - ----~ ----~ Existing Data Sets: 5 Run r Exit Selected Data Set:I ~ ... I Trials per Block: I 36 Blocks Run: 24 Initial Duration (Ticks): I ~ ;:::::::== Analyze From Block: Number ofDurations:I 6 ToBlock:~ Duration spacing (ticks) I" Copy To Clipboard... Plot Options... Window Color: ~ • Plot lines Stimulus Color: ~ o No lines Filter size (pixels):I 6 I o Log Duration o Mask stimulus? r----- I Both o -lnfl-p) Durations: 13to 147111s Contrast: 0.570 n: 48; ses =0.032 Low-pass cutoff (cldigit): 1.95

Figure 1. Main window of example graphic user interface (GUI) created to accompany an experiment (the filter experiment) designed to investigate the effects of spatial frequency filtering on digit recall. Note: This is a black and white reproduction ofa multicolored GUI.

a data set is selected for analysis on the GUI, the param­ static text cannot be edited on an active GUI, it can be eter values corresponding to that data set are automati­ changed in real time by the underlying programming cally loaded and displayed in the editable boxes. code to reflect changes made to relevant editable items The various pieces ofinformation below the parameter on the GUI. list are updated when parameter values are altered. For Stimulus preview. The black box in the bottom left example, if the editable text corresponding to (i.e., just to corner ofthe window shows a preview ofwhat the stim­ the right of) "Number of Durations" were to be changed uli wilIlook like during the experiment (showing, from from 6 to 8, the static text "Durations: 13 to 14T' would top to bottom, N, LSF, and HSF stimuli). Like the static change to read "Durations: 13 to 200." Note that although text below the parameter list, the preview stimuli also 294 HARLEY AND LOFTUS change to reflect the values set in the parameter list. This both) can be copied to the clipboard by clicking on the allows the experimenter to see how manipulating vari­ "Copy to Clipboard" buttons. This is particularly useful ables, such as stimulus color (gray-scale value rang­ for transferring data to a spreadsheet application, such as ing from 1 to 256) or filter size, will affect the appear­ Excel, or to a graphing application, such as Kaleidagraph. ance of the stimuli, without entailing actual execution of Plot options. Four plot options are provided on the the experiment. GUI. The first two are displayed as mutually exclusive radio buttons: "Plot lines" and "No lines." These allow the Execution of the Experiment from user to choose whether or not to display the lines on the Within the Graphic User Interface graph or remove them, displaying only the data points In visual perception experiments, it is common to have and standard error bars. Below the radio buttons are two few observers but a great deal ofdata per observer. With plot options check boxes. The first, when checked, plots the aid of a GUI, observers can easily collect their data the data on a log duration scale, whereas the second without the presence ofthe experimenter. changes the data from probability (p) to a transform of Data collection. In the experiments conducted in our probability, [-In(1 - p)] (see Loftus, Busey, & Senders, laboratory, observers are instructed to open MATLAB 1993). When anyone ofthese radio or check boxes is se­ and to type the name ofthe experiment in the Command lected or deselected, the GUI immediately updates the Window, which calls up and executes the relevant GUI. graph to reflect the change. Once the GUI is open, the observers select their initials Graphical display. The lower right corner ofthe main from the "Observer Initials" pop-up menu, select the ap­ window contains a simple graph of the data that auto­ propriate data set from the "Selected Data Set" pop-up matically updates itselfwhen new observers and/or data menu, and click on the button entitled "Run." While the sets are selected for analysis. MATLAB provides a mul­ experiment is running, the MATLAB code automatically titude ofplot options for use in graphing, including vari­ saves data to the observer's data file on completion of ous colors, symbols, line styles, axes labels, legends, and each block oftrials, thereby eliminating the necessity for so forth. Graphs in MATLAB can be as simple or as com­ the observers to be responsible for saving their own data plex as the user desires. to a file at the end ofa data collection session. At the end of a session, observers are returned to the GUI, where Theory Fitting they can view their data in various ways (see the Data In our example GUI, we have created a second GUI Analysis section) or simply quit and leave. window, the theory window, shown in Figure 2, for all Feedback options and experiment execution. The theory-related operations. upper middle section ofthe GUI's main window provides Linkto theory window and exit button. In the GUI's feedback options, as well as the experiment execution main window, the user is provided two options for leav­ button, entitled "Run." Check boxes are utilized here to ing the window: a link to the corresponding theory win­ provide two feedback options: visual and auditory. These dow,or an exit out ofthe GUI altogether. The two buttons boxes are not mutually exclusive; they can be indepen­ that perform these tasks are located within a small frame dently selected and deselected by the user. The effect of in the upper right portion ofthe main window. While the clicking on the "Run" button is to execute the filter ex­ "Exit" button simply closes the GUI, the "Theory" button periment by calling up MATLAB routines that perform opens the theory window (described below), while leav­ the following operations. First, the requested data set is ing open the main window of the GUI. This allows the loaded, and the savedparameter values are evaluated. Then user to click between the two windows, altering observer a stimulus-creation routine creates and stores the requi­ and/or data set selection for theory fits. site number of stimuli needed for the first block of ex­ Theory window. Figure 2 shows the theory window perimental trials (i.e., random four-digit strings are gen­ created to accompany the main window ofthe filter ex­ erated and filtered). Counterbalancing for the first block periment GUI. The code called by various objects within oftrials is carried out, and finally, the computer screen is the window utilizes MATLAB's optimization tools to fit cleared, and the observer is prompted to initiate the first a specific quantitative theory to the filter experiment data. trial with a keypress. At the end ofeach block, the observer For interested readers, the perceptual theory used to fit is prompted with the option to either continue with a new data from the filter experiment is described in numerous block oftrials or quit and return to the GUI. publications (e.g., Busey & Loftus, 1994; Loftus et al., 1993; Loftus & Ruthruff, 1994). We will refer to it as the Data Analysis sensory response/information-acquisition rate (SRIAR) The final section ofthe GUI's main window, the bot­ theory. tom right, is devoted to data analysis. The static text, Although knowledge ofthe SRIAR theory is not crit­ "Blocks Run: 24," indicates that the selected observer, ical for understanding the essence ofthis article, we pro­ E.o., has collected 24 blocks ofdata for Data Set 2. Edit vide a very briefsynopsis ofthe parameters, to aid in un­ text boxes allow the experimenter to specify analysis of derstanding the GUI's theory window. The SRIAR theory either the entire set of blocks (the default) or any valid has four parameters. First, n (a unitless positive integer) subset ofblocks. Data (probabilities, standard errors, or and r (a positive real number with units oftime) are the MATLAB AND GRAPHICAL USER INTERFACES 295

Figure 2. Theory window of the filter experiment graphic user interface (GUI). This win­ dow is called by the "Theory" push button on the main window ofthe GUI and utilizes MAT­ LAB's optimization routines to fit Loftus and Busey's sensory response/information acqui­ sition rate theory to the filter experiment data. Note: This is a black and white reproduction ofa multicolored GUI. parameters ofa gamma function that allow generation of unitless number intimately connected to stimulus con­ an internal sensory response to a stimulus of a given trast). A parameter c (with units oftime- 1) controls the rate temporal shape. There is a sensory threshold, e, such that at which information is acquired from a given stimulus. further information processing takes place only when the For application in the present experiment to the issues of value of the sensory response is greater than e(e is a spatial filtering, two additional parameters are required. 296 HARLEY AND LOFTUS

A unitless parameter is added that reflects the relative BUSEY, T. A., & LOFTus, G. R. (1994). Sensory and cognitive compo­ weight of assumed high- versus low-spatial-frequency nents ofvisual information acquisition. Psychological Review, 101, channels, and finally, because observers appear to be im­ 446-469. COHEN J., MACWHINNEY B., FLATT, M., & PROVOST, J. (1993). perfect in several respects, a performance asymptote, A, PsyScope: An interactive graphic system for designing and control­ is required. ling experiments in the psychology laboratory using Macintosh com­ The resulting six free parameter values for the SRIAR puters. Behavior Research Methods, Instruments, & Computers, 25, theory are listed in edit text boxes along the top left side 257-271. HANSELMAN, D., & LITTLEFIELD, B. (1996). Mastering MATLAB: A ofthe theory window. Push buttons allow the user the op­ comprehensive tutorial and reference. Englewood Cliffs, NJ: Prentice­ portunity to parameters stored on the clipboard, as Hall. well as to copy parameters and theory predictions onto LOFTus,G. R., BUSEY, T.A., & SENDERS, J. W. (1993). Providing a sen­ the clipboard. To find the best-fitting theory parameters sory basis for models of visual information acquisition. Perception & for a set of data points, the experimenter clicks on the push Psychophysics, 54, 535-554. Lorrus, G.R., & RUTHRUFF, E. R. (1994). A theory ofvisual information button entitled "Find Best Fit." This button calls MAT­ acquisition and visual memory with special application to intensity­ LAB optimization routines that search for the values of duration tradeoffs. Journal ofExperimental Psychology: Human Per­ the free parameters that minimize error between the data ception & Performance, 20, 33-50. and the theory. Once found, the new parameters are copied MARCHAND, P. (1999). Graphics and GUIs with MATLAB (2nd ed.). Boca Raton, FL: CRC Press. into the parameter edit text boxes. Each time the param­ OLDS, E. S., & ENGEL, S. A. (1998). Linearity across spatial frequency eters are changed, either manually or via the optimization in object recognition. Vision Research, 38, 2109-2118. routines, the theory predictions are graphed in the axes PARISH, D. H., & SPERLING, G. (1991). Object spatial frequencies, reti­ as solid lines overlaying the data points. The action initi­ nal spatial frequencies, noise, and the efficiency ofletter discrimina­ ated by the "Full Theory" button is to smooth out the the­ tion. Vision Research, 31, 1399-1415. PELLI, D. G. (1997). The VideoToolbox software for visual psycho­ ory curves by calculating and plotting the theory predic­ physics: Transforming numbers into movies. Spatial Vision, 10,437­ tions over a large number of exposure durations, rather 442. than only at the six experimentally tested durations. Fi­ ST. JAMES, J. D., & SCHNEIDER, W. (1991). Student MEL software sup­ nally, the "Reverse Mask" checkbox was created to allow port for instructors and teaching assistants in research methods course. Behavior Research Methods, Instruments, & Computers, 23, us to see whether the SRIAR theory could fit the data if 149-154. it was misled about whether or not the stimuli in a partic­ SCHNEIDER, W. (1989). Enhancing a standard experimental delivery ular data set were masked (incidentally, we found that it system (MEL) for advanced psychological experimentation. Behav­ could not). ior Research Methods, Instruments, & Computers, 21, 240-244. YEE, P. L., & VAUGHAN J. (1999). A Web-accessible tutorial for PsyScope based on classic experiments in human cognition. Behav­ SUMMARY AND CONCLUSIONS ior Research Methods, Instruments, & Computers, 31, 107-112.

MATLAB is a convenient platform for the develop­ NOTES ment and management of psychological experiments, I. The Math Works announced in 1998 that it would no longer sup­ owing to its easy-to-use programming language, sophis­ port the Macintosh past version 5.2. It is hoped that The Math Works ticated graphics features, and statistics and optimization will reconsider this decision in view of the Macintosh's resurgence. tools. Through the additional implementation of the 2. Costwise, MATLAB is an excellent alternative to other experiment Brainard-Pelli Psychophysics Toolbox, MATLAB's in­ creation software packages. The student version ofMATLAB (which is terpreted programming language gains the power and a full version, not scaled down) currently sells for $99, with optional toolboxes, such as the Statistics and Optimization toolboxes, costing an flexibility ofa low-level language, giving the user close additional $59 each. The academic cost ofMATLAB for nonstudents is temporal and spatial control over the CRT display. $500 with optional toolboxes costing an additional $200 each. MATLAB's benefits to psychological experimentation 3. To download or to obtain further information about the free can be further increased through the use ofone graphical Psychophysics Toolbox available for both Macintosh and Windows, go to http://color.psych.ucsb.edu/psychtoolboxl feature in particular, the GUI. A well-designed GUI is a 4. For use in this paper, the stimulus color listed for observer E.U. in powerful tool for organizing and controlling all aspects Figure I was altered from its actual value of146 to a lower value of 115. ofrunning a psychological experiment, including design, This was done to increase the contrast ofthe stimuli pictured in the bot­ data collection, data analysis, and theory fitting. tom left comer of the GUI and, hence, improve the visibility of these stimuli for the reader. REFERENCES

BRAINARD, D. H. (1997). The Psychophysics Toolbox. Spatial Vision, (Manuscript received November I, 1999; 10,433-436. revision accepted for publication February 25, 2000.)