https://github.com/mathworks-teaching-resources/electricity-magnetism
Interactive courseware enhancing the learning of electricity and magnetism, focusing on capacitors and DC motors with examples and visuals.
https://github.com/mathworks-teaching-resources/electricity-magnetism
courseware cwm electricity engineering matlab simscape
Last synced: about 1 month ago
JSON representation
Interactive courseware enhancing the learning of electricity and magnetism, focusing on capacitors and DC motors with examples and visuals.
- Host: GitHub
- URL: https://github.com/mathworks-teaching-resources/electricity-magnetism
- Owner: MathWorks-Teaching-Resources
- License: bsd-3-clause
- Created: 2025-02-20T18:19:43.000Z (over 1 year ago)
- Default Branch: release
- Last Pushed: 2025-02-20T19:23:34.000Z (over 1 year ago)
- Last Synced: 2025-02-20T20:21:36.591Z (over 1 year ago)
- Topics: courseware, cwm, electricity, engineering, matlab, simscape
- Language: MATLAB
- Homepage:
- Size: 2.13 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Electricity & Magnetism: Introduction
[](https://www.mathworks.com/matlabcentral/fileexchange/180193-electricity-magnetism-introduction) or [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=README.mlx)
[](https://MathWorks-Teaching-Resources.github.io/Electricity-Magnetism)
**Curriculum Module**
_Created with R2024b. Compatible with R2024b and later releases._
# Information
This curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) that provides supplementary examples and visualizations to enhance understanding of electricity and magnetism principles, specifically focusing on common application like capacitors and DC motors.
## Background
This initial release of the Electricity & Magnetism courseware features two interactive scripts that explore the principles of how capacitors function, based on the laws of electrostatics.
The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the
Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.
## Contact Us
Solutions are available upon instructor request. Contact the [MathWorks Educator Content Development Team](mailto:onlineteaching@mathworks.com) if you would like to provide feedback, or if you have a question.
## Prerequisites
This module assumes knowledge of basic calculus and introductory physics, including mechanics and fundamental concepts of electricity and magnetism.
## Getting Started
### Accessing the Module
### **On MATLAB Online:**
Use the [
](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/emag&project=emag.prj) link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.
### **On Desktop:**
Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\-click on [emag.prj](). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start.
Ensure you have all the required products ([listed below](#H_E850B4FF)) installed. If you need to include a product, add it using the Add\-On Explorer. To install an add\-on, go to the **Home** tab and select
**Add-Ons** > **Get Add-Ons**.
## Products
MATLAB® is used throughout the module along with the following products:
Simulink®
Symbolic Math Toolbox™
Simscape™
Partial Differential Equation Toolbox™
# Scripts
**Capacitors series**
|||
| :-- | :-- |
|
| [**CapacitorsFundamental.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=Scripts/CapacitorsFundamentals.mlx)
**In this script, students will...**
$\bullet$ Explore the fundamental principles and applications of capacitors in electrical circuits.
$\bullet$ Analyze the relationship between capacitors and electric fields, including their role in storing and releasing electrical energy.
|
|
| [**CapacitorsChargeDischarge.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=Scripts/CapacitorsChargeDischarge.mlx)
**In this script, students will...**
$\bullet$ Analyze energy storage in capacitors and evaluate its applications in circuits.
$\bullet$ Simulate the charge and discharge of capacitors to demonstrate their role.
|
## [**ElectricFieldAndCharge.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=Scripts/ElectricFieldAndCharge.mlx)
|||
| :-: | :-- |
|
| **In this script, students will...**
$\bullet$ Analyze the relationship between electric charges and electric fields.
$\bullet$ Compute the electric field due to point charges and continuous charge distributions.
$\bullet$ Visualize Coulomb force and electric fields.
|
## [**VisualizeField.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=Scripts/VisualizeField.mlx)
|||
| :-- | :-- |
|
| **In this script, students will...**
$\bullet$ Learn how to visualize a field in two dimensions.
$\bullet$ Visualize their own electric field.
|
## [**GaussLawDoc.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=Scripts/GaussLawDoc.mlx)
|||
| :-- | :-- |
|
| **In this script, students will...**
$\bullet$ Analyze charge distribution to identify symmetry.
$\bullet$ Learn to select an appropriate Gaussian surface with respect to the charge distribution.
$\bullet$ Compute electric field for various charge configurations using Gauss's Law.
|
## [**MagneticFieldAndCurrent.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Electricity-Magnetism&project=emag.prj&file=Scripts/MagneticFieldAndCurrent.mlx)
|||
| :-- | :-- |
|
| **In this script, students will...**
$\bullet$ Describe how electric currents generate magnetic fields.
$\bullet$ Apply the Biot\-Savart law and Ampère's law to calculate magnetic fields.
$\bullet$ Illustrate magnetic field lines around current\-carrying conductors.
|
## **MagneticDipole.mlx (planned)**
|||
| :-- | :-- |
|
| **In this script, students will...**
$\bullet$ Explain the concept of magnetic dipole and its properties.
$\bullet$ Evaluate the interaction of magnetic dipoles with external magnetic fields.
$\bullet$ Determine the torque and potential energy of magnetic dipoles in various field configurations.
|
## **MagneticApplication.mlx (planned)**
|||
| :-- | :-- |
|
| **In this script, students will...**
$\bullet$ Explain the basic principles of DC motor operation and the role of electromagnetic force.
$\bullet$ Examine the relationship between current, magnetic field, and torque in a DC motor.
$\bullet$ Model the performance and efficiency of DC motors.
|
# License
The license for this module is available in the [LICENSE.md](https://github.com/MathWorks-Teaching-Resources/Electricity-Magnetism/blob/release/LICENSE.md).
## [DC Circuit Analysis](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/DC-Circuit-Analysis&project=DCCircuitAnalysis.prj&file=README.mlx)
|||
| :-- | :-- |
|
| **Available on:**
[
](https://www.mathworks.com/matlabcentral/fileexchange/103375-dc-circuit-analysis)
[
](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/DC-Circuit-Analysis&project=DCCircuitAnalysis.prj&file=README.mlx)
[GitHub](https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis)
|
## [Virtual Measurement of Electron charge\-to\-mass ratio lab](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Virtual-Measurement-of-the-Electron-Charge-To-Mass-Ratio-Lab&project=virtual-measurement-of-the-electron-charge-to-m.prj&file=README.mlx)
|||
| :-- | :-- |
|
| **Available on:**
[
](https://www.mathworks.com/matlabcentral/fileexchange/94540-virtual-measurement-of-e-m-lab)
[
](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Virtual-Measurement-of-the-Electron-Charge-To-Mass-Ratio-Lab&project=virtual-measurement-of-the-electron-charge-to-m.prj&file=README.mlx)
[GitHub](https://github.com/MathWorks-Teaching-Resources/Virtual-Measurement-of-the-Electron-Charge-To-Mass-Ratio-Lab)
|
Or feel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22&sort=downloads_desc_30d).
# Educator Resources
- [Educator Page](https://www.mathworks.com/academia/educators.html)
# Contribute
Looking for more? Find an issue? Have a suggestion? Please contact the [MathWorks Educator Content Development Team](mailto:%20onlineteaching@mathworks.com). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/Electricity-Magnetism/blob/release/CONTRIBUTING.md) page on GitHub.
*©* Copyright 2025 The MathWorks, Inc