COVID-19 Update: We are currently shipping orders daily. However, due to transit disruptions in some geographies, deliveries may be delayed. To provide all customers with timely access to content, we are offering 50% off Science and Technology Print & eBook bundle options. Terms & conditions.
Programming for Electrical Engineers - 1st Edition - ISBN: 9780128215029, 9780128215036

Programming for Electrical Engineers

1st Edition

MATLAB and Spice

0.0 star rating Write a review
Authors: James Squire Julie Brown
Paperback ISBN: 9780128215029
eBook ISBN: 9780128215036
Imprint: Academic Press
Published Date: 25th September 2020
Page Count: 288
Sales tax will be calculated at check-out Price includes VAT/GST
Price includes VAT/GST

Institutional Subscription

Secure Checkout

Personal information is secured with SSL technology.

Free Shipping

Free global shipping
No minimum order.


Programming for Electrical Engineers: MATLAB and Spice introduces beginning engineering students to programming in Matlab and Spice through engaged, problem-based learning and dedicated electrical and computer engineering content. The book draws its problems and examples specifically from electrical and computer engineering, covering such topics as circuit analysis, signal processing, and filter design. It teaches relevant computational techniques in the context of solving common problems in electrical and computer engineering, including mesh and nodal analysis, Fourier transforms, and phasor analysis.

Programming for Electrical Engineers: MATLAB and Spice is unique among MATLAB textbooks for its dual focus on introductory-level learning and discipline-specific content in electrical and computer engineering. No other textbook on the market currently targets this audience with the same attention to discipline-specific content and engaged learning practices. Although it is primarily an introduction to programming in MATLAB, the book also has a chapter on circuit simulation using Spice, and it includes materials required by ABET Accreditation reviews, such as information on ethics, professional development, and lifelong learning.

Key Features

  • Discipline-specific: Introduces Electrical and Computer Engineering-specific topics, such as phasor analysis and complex exponentials, that are not covered in generic engineering Matlab texts
  • Accessible: Pedagogically appropriate for freshmen and sophomores with little or no prior programming experience
  • Scaffolded content: Addresses both script and functions but emphasizes the use of functions since scripts with non-scoped variables are less-commonly encountered after introductory courses
  • Problem-centric: Introduces MATLAB commands as needed to solve progressively more complex EE/ECE-specific problems, and includes over 100 embedded, in-chapter questions to check comprehension in stages and support active learning exercises in the classroom
  • Enrichment callouts: "Pro Tip" callouts cover common ABET topics, such as ethics and professional development, and "Digging Deeper" callouts provide optional, more detailed material for interested students


First and second year engineering students in Electrical and Computer Engineering (EE/CpE/ECE) programs / professionals across all technical areas interested in teaching themselves MATLAB programming

Table of Contents


Purpose of this text

Software for Electrical Engineers

Formatting conventions

Chapter 1: Introduction to MATLAB


Starting MATLAB and the workspace

Using MATLAB as a calculator


Tech Tip: Charge and current

Naming and inspecting variables

Parentheses and implied multiplication

Special symbols: i, j, and π

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



Tech Tip: Measuring resistance


Creating vectors

Tech Tip: Resistors in series and parallel

Working with vectors

Complex numbers

Vector mathematics

Pro Tip: Buying a digital multimeter (DMM)


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


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


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


Why program?


Tech Tip: Wire sizing


Function arguments

Creating your own functions

Commenting programs

More complex function examples


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



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


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


Circuit simulation

Tech Tip: What is ground?


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



No. of pages:
© Academic Press 2021
25th September 2020
Academic Press
Paperback ISBN:
eBook ISBN:

About the Authors

James Squire

Dr. James Squire is the Jamison-Payne chaired Professor of Engineering at the Virginia Military Institute. Dr. Squire graduated from the U.S. Military Academy and was awarded a Bronze Star in Desert Storm. He was awarded several patents while earning his doctorate from the Massachusetts Institute of Technology. He has been awarded the state-level Outstanding Faculty Award from Virginia as well as every major teaching award from the Virginia Military Institute. He has over 40 publications, 8 patents, 2 startup companies, an active consulting practice, and is an honorary member of the VMI Class of 2009.

Affiliations and Expertise

Department of Electrical Engineering, Virginia Military Institute, Lexington, VA, USA

Julie Brown

Julie Phillips Brown is an Associate Professor of English in the Department of English, Rhetoric, and Humanistic Studies at Virginia Military Institute. Prior to her appointment at VMI, she served as the N.E.H. Postdoctoral Fellow in Poetics at the Bill and Carol Fox Center for Humanistic Inquiry at Emory University. Dr. Brown completed her graduate work at Cornell University, where she earned an M.F.A. in Creative Writing and a Ph.D. in English Literature. Interdisciplinary inquiry and practice are central to Dr. Brown’s teaching and research, which focus on the intersections of poetry and poetics, the history of the book and book arts, visual art and performance, and STEAM and Digital Humanities-based pedagogies.

Affiliations and Expertise

Department of English, Rhetoric, & Humanistic Studies, Virginia Military Institute, Lexington, VA, USA

Ratings and Reviews