Basic Definitions

This section covers some basic definitions that will be useful to keep in mind while you read these tutorials. A few basic definitions include:

  • Array: A set of data that have been stored under one variable name.
  • Call: To execute/use. If you call a file, you are telling the program to execute or use it.
  • Command History: This window shows a log of all the commands you used to date, until the point at which the history was cleared.
  • Command Window: This window contains a real-time ‘console’ that you can use to test your code and to perform operations outside of script files.
  • Comment: Part of the code that the compiler ignores when executing the code. Comments are usually used to make references and to remind the coder about things that can be easily forgotten. They can act as labels so that the coder does not get confused. To make a comment, simply enter a percentage symbol ‘%’ before each line that you wish to comment out.
  • Current Folder: This contains the folder(s) that MATLAB is exploring; it is MATLAB’s Working Directory (once it has been added to MATLAB’s path). You can use the Current Folder to add files, folders or paths to MATLAB’s working directory.
  • Export: To create a file containing all the variables being used in the workspace (defined). This can be done using the ‘Save Workspace’ function in the ‘Variable’ section of the ‘Home’ tab.
  • Feedback: A form of output that lets you know the outcome of the code/process.
  • Import: To extract data from an external file for use in the workspace.
  • Path: The full link to the item in question (C:\blah\blah\item.eg). In the case of multiple files, the path would usually be the folder in which they are stored, and hence no extension at the end (C:\blah\blah).
  • Print: To get the program to output something to the screen.
  • Script: A body of code that has a purpose. A script can be executed by running it, to provide an output.
  • Syntax: The ‘grammar’ of programming languages.
  • Variable: A case-sensitive character or string that stores a value. Variables must start with a letter but can also contain numbers and certain special characters like underscores ‘_’ but may not contain others like the ‘@’ symbol. For a full list of what variables can or can’t contain, view the documentation on ‘Variable Names’. Figure 1.10 shows how to navigate to that documentation. Figure 1.10
Figure 1.10

Figure 1.10

  • Workspace: This window contains all the variables that are being used by MATLAB.