Introduction
Purpose of this text
Software for Electrical Engineers
Formatting conventions
Chapter 1: Introduction to MATLAB
Objectives
Starting MATLAB and the workspace
Using MATLAB as a calculator
Variables
Tech Tip: Charge and current
Naming and inspecting variables
Parentheses and implied multiplication
Special symbols: i, j, and p
Tech Tip: Voltage, current, charge, & resistance
Formatting numbers
Scientific notation
Exponentials and their inverses
Trig functions and their inverses
Pro Tip: IEEE
Creating vectors
Use of the semicolon
Tech Tip: Ohm’s Law
Plotting data
Getting help
Tech Tip: Using a digital multimeter (DMM) to measure steady voltage
Saving and loading variables
Keyboard shortcuts
Pro Tip: Careers in Electrical Engineering
Chapter 1 command review
Lab problems
Chapter 2: MATLAB as a Calculator
Objectives
Rounding
Tech Tip: Measuring resistance
Vectors
Creating vectors
Tech Tip: Resistors in series and parallel
Working with vectors
Complex numbers
Vector mathematics
Pro Tip: Buying a digital multimeter (DMM)
Matrices
Creating matrices
Tech Tip: Mesh and nodal analysis methods
Changing matrix values
Working with matrices
Tech Tip: Voltage dividers
Solving simultaneous equations
Command review
Pro Tip: Buying a calculator
Lab problems
Chapter 3: Plotting with MATLAB
Objectives
Types of plots
Tech Tip: Oscilloscopes
Line plot
Line plots with multiple lines
Scatter plots
Tech Tip: Bode plots
Plot scripts
Layering plot commands with hold()
Pro Tip: Professional licensure (PE)
Bar plots
Subplot
Tech Tip: Low pass filters
Advanced plot decoration
Text annotation
Tech Tip: Greek symbols in ECE
Advanced text formatting
Three dimensional MATLAB plots
Pro Tip: IEEE code of ethics
Command review
Lab problems
Chapter 4: MATLAB Programming
Objectives
Why program?
Scripts
Tech Tip: Wire sizing
Functions
Function arguments
Creating your own functions
Commenting programs
More complex function examples
Sorting
Pro Tip: Graduate studies in EE
Relational expressions
Logical operators
Logical operations on vectors and matrices
Tech Tip: Engineering notation
Conditional statements: if-end
Conditional statements: if-else-end
Tech Tip: Resistor color codes
Conditional statements: elseif
Creating strings with embedded numbers
Pro Tip: Industry or graduate school?
Command review
Lab problems
Chapter 5: Programming II: Looping
Objectives
disp()
for-end loops
Tech Tip: Monte Carlo simulations
Indexing vectors inside for loops
Nested loops
Using nested loops for exact solutions
Using nested loops for best solutions
Pro Tip: Non-engineering careers
tic, toc
Functions calling functions
break
Tech Tip: Binary math in MATLAB
Multiple functions in one m-file
while-end loops
Growing vectors vs. preallocation
Pro Tip: Fundamentals of engineering (FE)
Command review
Lab problems
Chapter 6: Spice
Objectives
Circuit simulation
Tech Tip: What is ground?
Utility
Installing LTspice
Tech Tip: Power vs. energy (work)
Steps in simulating
Schematic editor
Pro Tip: Ethics II
Types of LTspice simulations
DC simulation walkthrough
Tech Tip: 555 timer
Transient simulation
AC sweep simulation
Tech Tip: Operational amplifiers
Advanced tip: using nets
Pro Tip: Lifelong learning
Command review
Lab problems
Index