6.10: Chapter Review

Physical Modeling in MATLAB · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    6.10: Chapter Review

    In this chapter, we encountered relational operators and if statements, and we used them to develop a program that searches for Pythagorean triples. We wrote a logical function, which is a function that returns a logical value (1 for “true” or 0 for “false”).

    We also saw an example of incremental development, or developing programs gradually, adding just a few lines of code at a time and testing as you go. If you develop programs this way, you will have fewer bugs and you will find them more quickly.

    This chapter defined two new terms: encapsulation is the process of wrapping part of a program in a function in order to limit interactions (including name collisions) between the function and the rest of the program; abstraction is the process of ignoring the details of how a function works in order to focus on a simpler model of what the function does.

    The next chapter introduces a new tool, called fzero, that we’ll use to solve nonlinear equations.


    This page titled 6.10: Chapter Review was last modified on Thu, 17 Nov 2022 18:19:03 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Allen B. Downey (Green Tea Press) via source content that was edited to the style and standards of the LibreTexts platform.