2.8: Chapter Review
- Page ID
- 84687
This chapter presented scripts and suggested reasons to use them. We computed elements of a Fibonacci sequence, but because we used floating-point numbers, the results were sometimes only approximate. And we saw how to add comments to a program to document what it does and explain how it works.
Here are some terms from this chapter you might want to remember.
An M-file is a file that contains a script, which is a sequence of MATLAB/Octave commands. The search path is the list of folders where the interpreter looks for M-files.
A precondition is something that must be true when the script starts in order for it to work correctly; a postcondition is something that will be true when the script completes.
The target of an assignment statement is the variable on the left side.
Floating-point is a way to represent and store numbers in a computer. is a format for typing and displaying large and small numbers; for example, 3.0e8
represents \(3.0 \times 10^8\) or 300,000,000.
A verbatim is part of a program that provides additional information about the program, but does not affect its execution.
In the next chapter, you’ll learn how to write programs that perform repetitive tasks using loops.