MATLAB

3. Script M-files

Search Path

Suppose you type in crow after the prompt; in other words >> crow

How is this to be interpreted? MATLAB interprets this statement using the following hierarchy:

  1. It checks to see if you merely wish to print out the value of a variable named crow in the current MATLAB workspace. If not,
  2. it checks to see if crow is a built-in MATLAB command. If not,
  3. it checks to see if you wish to execute an M-file named crow.m that you have saved in your current working directory. (There is a further possibility not discussed here.)