2.1: Learning Objectives

Fundamentals of MATLAB Programming · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

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

    2.1: Learning Objectives

    The Command Window is great for quick calculations, but scripts and functions are how we turn MATLAB commands into reusable programs. In this chapter, we begin writing MATLAB programs that ask for input, perform calculations, and display meaningful output.

    By the end of this chapter, you should be able to:

    Learning Objectives
    • Explain what an algorithm is and why algorithms are useful before writing MATLAB code.
    • Create, save, run, and document MATLAB scripts.
    • Use comments and help text to make scripts and functions easier to understand.
    • Use input to receive numeric and text information from the user.
    • Use disp and fprintf to display output in the Command Window.
    • Apply formatting operators such as %d, %f, %.2f, %s, and in fprintf statements.
    • Create user-defined functions with input arguments and output arguments.
    • Call user-defined functions from the Command Window and from scripts.
    • Use common MATLAB math functions in engineering-style calculations.

    This page titled 2.1: Learning Objectives was last modified on Tue, 30 Jun 2026 02:11:44 GMT and is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Zara Noroozi.