1.5 Writing simple MATLAB scripts
1.6 A few words about errors and debugging
This chapter will introduce the basics of using MATLAB, first as a powerful calculator, and then as a platform for writing simple programs that automate what a calculator would do in many steps. The emphasis here will be on performing basic mathematical operations on numbers.
The MATLAB integrated development environment is the program that runs when you launch MATLAB. You will use it to operate MATLAB interactively, and to develop and run MATLAB programs.
The concept of a MATLAB variable is important to grasp. It is not identical with the familiar mathematical notion of a variable, though the two are related. MATLAB variables should be thought of as labeled boxes that hold a number, or other type of information.
MATLAB has many built-in functions for evaluating common mathematical functions. More complicated MATLAB functions, including those of your own making, will be explored further in Chapter 7.
After completing this chapter you should be able to:
- Use the MATLAB integrated development environment to operate MATLAB interactively from within the Command window.
- Create and name MATLAB variables, and assign them numerical values.
- Invoke several built-in MATLAB mathematical ...
Get Learning to Program with MATLAB: Building GUI Tools now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.