Bare Essentials

At the end of this chapter you should be able to
  1. Identify the key differences between scripts and functions.
  2. Edit and run an m-file (both functions and scripts).
  3. Create a function with one, two or more input parameters and one, two or more output parameters.
  4. Use comment statements to add documentation to scripts and functions.
  5. Use disp to print a string and a matrix to the command window.
  6. Use relational operators (<, <=, >, >=, ~=), and logical operators (&, |, ~).
  7. Use if...end, if...elseif...end, and if...elseif...else...end constructs.
  8. Use for loops
  9. Use while loops
  10. Know the difference between break and return, and know how and where to use each.
  11. Use feval. Know how to pass a function name as an input parameter to another function.