Programming for Electrical Engineers

Programming for Electrical Engineers

MATLAB and Spice

1st Edition - July 8, 2020

Write a review

  • Authors: James Squire, Julie Brown
  • eBook ISBN: 9780128215036
  • Paperback ISBN: 9780128215029

Purchase options

Purchase options
DRM-free (PDF, Mobi, EPub)
In Stock
Sales tax will be calculated at check-out

Institutional Subscription

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

  • Cover image
  • Title page
  • Table of Contents
  • Copyright
  • Foreword
  • Acknowledgment
  • Introduction
  • Introduction to matlab
  • Starting matlab and the Workspace
  • Using matlab as a Calculator
  • Variables
  • Naming and Inspecting Variables
  • Parentheses and Implied Multiplication
  • Special Symbols: i, j, and π
  • Formatting Numbers
  • Scientific Notation
  • Exponentials and Their Inverses: exp, ^, sqrt, log, log10
  • Trig Functions and Their Inverses
  • Creating Vectors
  • Use of the Semicolon
  • Plotting Data
  • Getting Help
  • Saving and Loading Variables
  • Keyboard Shortcuts
  • Command Review
  • Lab Problems
  • 2. matlab as A Calculator
  • Rounding and Separating Numbers
  • Vectors
  • Creating Vectors
  • Working With Vectors
  • Complex Numbers
  • Vector Mathematics
  • Strings
  • Matrices
  • Creating Matrices
  • Changing Matrix Values
  • Working With Matrices
  • Solving Simultaneous Equations Using Matrices
  • Command Review
  • Lab Problems
  • 3. matlab Graphics
  • Types of Plots
  • Line Plot
  • Axis Labels and Titles
  • Line Plots With Multiple Lines
  • Scatter Plots
  • Plotting Scripts
  • Layering Plot Commands Using hold()
  • Bar Plots
  • Subplot
  • Advanced Plot Decoration
  • Text Annotations
  • Advanced Text Formatting
  • Three-Dimensional matlab Plots
  • Command Review
  • Lab Problems
  • 4. matlab Programming
  • Why Program?
  • Scripts
  • Functions
  • Function Arguments
  • Creating Your Own Functions
  • Commenting Programs
  • Creating Help
  • More Complex Function Examples
  • Sorting
  • Relational Expressions
  • Logical Operators
  • Logical Operations on Vectors and Matrices
  • Conditional Branching: if-end
  • Conditional Branching: if-else-end
  • Conditional Branching: if-elseif-else-end
  • Creating Strings With Embedded Numbers
  • Command Review
  • Lab Problems
  • 5. Programming II: Looping
  • Disp
  • For-End Loop
  • For-End Loops Indexing Vectors
  • Nested Loops
  • Using Nested Loops to Search for Exact Solutions
  • Using Nested Loops to Search for Best Solutions
  • tic, toc
  • Functions Calling Functions
  • break
  • Multiple Functions in One M-File
  • while-end Loop
  • Growing Versus Pre-Allocating Vectors
  • Command Review
  • Lab Problems
  • 6. Spice
  • Circuit Simulation
  • Utility
  • Installing Ltspice
  • Steps in Simulating
  • Schematic Editor
  • Types of LTspice Simulations
  • DC Simulation Walkthrough
  • Transient Simulation
  • AC Sweep Simulation
  • Advanced Tip: Using Nets
  • Command Review
  • Lab Problems
  • Index

Product details

  • No. of pages: 288
  • Language: English
  • Copyright: © Academic Press 2020
  • Published: July 8, 2020
  • Imprint: Academic Press
  • eBook ISBN: 9780128215036
  • Paperback ISBN: 9780128215029

About the Authors

James Squire

James Squire is the Jamison-Payne chaired Professor of Engineering at the Virginia Military Institute. Dr. Squire graduated from the US Military Academy and was awarded a Bronze Star in Desert Storm. He was awarded two patents while earning his doctorate from the Massachusetts Institute of Technology. He has been awarded the state-level Outstanding Faculty Award from Virginia and every major teaching award from the Virginia Military Institute. He has over 50 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

Write a review

There are currently no reviews for "Programming for Electrical Engineers"