APPENDIX B images

MATLAB, Matrices, and Complex Arithmetic

It has become commonplace for engineers to use the MATLAB® computer program to perform a variety of technical calculations. MATLAB, short for MATrix LABoratory, is produced and supported by the company named The Math Works, which provides demos and application notes at its Web site, www.mathworks.com. In addition, MATLAB has extensive built-in help, as shown in Figure B.1.

In this appendix, we will first use MATLAB as a powerful calculator, then use it to solve equations involving matrices or complex numbers and, finally, use it to plot functions.

B.1 Using MATLAB as a Calculator

Consider the equation

images

Let's use MATLAB to evaluate D when A = 4, B = 7, and C = 6. To do so, we write the equations representing A, B, C, and D in the MATLAB workspace, using the arithmetic operations and functions available in MATLAB. Tables B.1 and B.2 list the arithmetic operations and some of the functions available in MATLAB.

images

FIGURE B.1 MATLAB Help is accessed by clicking Help on the MATLAB menu bar.

Table B.1 Arithmetic Operations

images

Table B.2 Built-in ...

Get Introduction to Electric Circuits, 9th Edition 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.