Contents Preface ix Acknowledgements xi About the Authors 1 Introduction 1 2 Interacting With MATLAB 22 3 Matrices 38 4 Calculations 6 5 Contingencies 99 6 Input-Output 128 7 Data Types 8 Modules and Functions 182 9 Plots 10 Lines,Shapes,and Images 248 11 Animation and Sound 12 Enhanced User Interaction 13 Psychtoolbox 14 Debugging 355 15 Going On 370vii Preface ix Acknowledgements xii About the Authors xiii 1 Introduction 1 2 Interacting With MATLAB 22 3 Matrices 38 4 Calculations 62 5 Contingencies 99 6 Input-Output 128 7 Data Types 156 8 Modules and Functions 182 9 Plots 208 10 Lines, Shapes, and Images 248 11 Animation and Sound 287 12 Enhanced User Interaction 304 13 Psychtoolbox 323 14 Debugging 355 15 Going On 370 Contents