Intro to MATLAB Flashcards
What is psychtoolbox?
- Uses MATLAB functions for behavioural experiments
- Precise control of stimulus and collection of responses
What is the order of precedence in mathamatical functions?
1) Brackets
2) Power
3) Multiplication/Division
4) Addition/SUbtraction
What does the command ‘clc’ do?
Clears command window
What does the function ‘clear’ do?
Removes items from the workspace
What does the function ‘save’ do?
Saves workspace variables to file
What does the function ‘load’ do?
Loads variables from file into workspace
What are variables?
A storage location paired with an associated symbolic name as an identifier
- Must be defined before it can be used
What are Boolean expressions?
Are either true or false
What can variables not do?
Contain spaces or start with numbers
What does the ‘exist’ function do?
Checks for the existence of a variable or function
What can the ‘who’ function do?
list variables
What can the ‘which’ function do?
locate functions and files
What are functions?
small executables which achieve a task in a pre-defined way
What is the structure of a function in MATLAB?
function output = myfunction (input) % description of function << lines of code to implement function >>
What are control statements?
Controlling what is executed when and under what conditions
e.g ‘if’, ‘elseif’ and ‘else’