{"id":21478389,"url":"https://github.com/mathworks-teaching-resources/dc-circuit-analysis","last_synced_at":"2025-09-02T20:35:50.081Z","repository":{"id":109700505,"uuid":"436685842","full_name":"MathWorks-Teaching-Resources/DC-Circuit-Analysis","owner":"MathWorks-Teaching-Resources","description":"Virtual labs for DC circuit analysis.","archived":false,"fork":false,"pushed_at":"2025-06-13T18:42:19.000Z","size":16256,"stargazers_count":21,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"release","last_synced_at":"2025-07-15T22:03:21.875Z","etag":null,"topics":["circuits","courseware","cwm","dc","electrical-engineering","matlab","simulink","virtual-labs"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MathWorks-Teaching-Resources.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-09T16:29:54.000Z","updated_at":"2025-06-25T13:00:30.000Z","dependencies_parsed_at":"2023-11-21T17:28:04.053Z","dependency_job_id":"38b293e7-01d8-4f86-8151-940a7652ffcf","html_url":"https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/MathWorks-Teaching-Resources/DC-Circuit-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FDC-Circuit-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FDC-Circuit-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FDC-Circuit-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FDC-Circuit-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathWorks-Teaching-Resources","download_url":"https://codeload.github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis/tar.gz/refs/heads/release","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FDC-Circuit-Analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268205933,"owners_count":24212999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circuits","courseware","cwm","dc","electrical-engineering","matlab","simulink","virtual-labs"],"created_at":"2024-11-23T11:17:59.162Z","updated_at":"2025-08-01T10:13:37.832Z","avatar_url":"https://github.com/MathWorks-Teaching-Resources.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# \u003cspan style=\"color:rgb(213,80,0)\"\u003eDC Circuit Analysis\u003c/span\u003e\n\n\n[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/103375-dc-circuit-analysis) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/DC-Circuit-Analysis\u0026project=DCCircuitAnalysis.prj\u0026file=README.mlx)\n\n[![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FDC-Circuit-Analysis%2Frelease%2FImages%2FTestedWith.json)](https://MathWorks-Teaching-Resources.github.io/DC-Circuit-Analysis)\n\n**Curriculum Module**\n\n_Created with R2024b. Compatible with R2024b and later releases._\n\n# Information\n\nThis curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) and [Simscape™](https://www.mathworks.com/products/simscape.html) models that teaches the fundamental concepts of DC circuits.\n\n\n## Background\n\nYou can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. DC Circuit Analysis covers topics such as mesh analysis, nodal analysis, thevenin circuits, RL circuits, RLC circuits, and op amps. It also includes an application of a virtual oscilloscope to perform measurements of the variety of DC circuits.\n\n\nThe 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 \u003cimg src=\"Images/image_0.png\" width=\"19\" alt=\"image_0.png\"\u003e Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.\n\n## Contact Us\n\nSolutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:onlineteaching@mathworks.com) if you would like to request solutions, provide feedback, or if you have a question.\n\n\n## Prerequisites\n\nThis module assumes knowledge of basic ciruit theory and standard electrical circuit notation. There is minimal MATLAB and Simscape knowledge required for these scripts, but you could use [MATLAB Onramp](https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted) and [Circuit Simulation Onramp](https://matlabacademy.mathworks.com/details/circuit-simulation-onramp/circuits) as a resource to acquire familiarity with MATLAB syntax, live scripts, and models.\n\n\n## Getting Started\n### Accessing the Module\n### **On MATLAB Online:**\n\nUse the [\u003cimg src=\"Images/image_1.png\" width=\"136\" alt=\"image_1.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/DC-Circuit-Analysis\u0026project=DCCircuitAnalysis.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.\n\n### **On Desktop:**\n\nDownload or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\\-click on [DCCircuitAnalysis.prj](https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis/blob/release/DCCircuitAnalysis.prj). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start. \n\n\nEnsure you have all the required products (listed below) 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  \u003cimg src=\"Images/image_2.png\" width=\"16\" alt=\"image_2.png\"\u003e **Add-Ons** \u003e **Get Add-Ons**. \n\n\n## Products\n\n *MATLAB* is used throughout. Tools from *Simulink®, Simscape, Simscape Electrical™, and DSP System Toolbox™* are used frequently as well. *Symbolic Math Toolbox™* is used as well for the [syms](https://www.mathworks.com/help/symbolic/syms.html) function and *Control System Toolbox™* is used for the [tf](https://www.mathworks.com/help/releases/R2024b/control/ref/tf.html?overload=tf+false) function.\n\n\n# Scripts\n\n *If you are viewing this in a version of MATLAB prior to R2023b, you can view the learning outcomes for each script* [*here*](https://www.mathworks.com/matlabcentral/fileexchange/103375-dc-circuit-analysis)\n\n## [**MeshAnalysis.mlx**](./Scripts/MeshAnalysis.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_3.png\" width=\"171\" alt=\"image_3.png\"\u003e \u003cbr\u003e  | • Use mesh analysis to compute currents through a linear circuit. \u003cbr\u003e • Solve the matrix form of circuit equations in MATLAB. \u003cbr\u003e • Model and analyze linear circuits in Simscape. \u003cbr\u003e  | • Electrical Engineering \u003cbr\u003e   |\n|      |      |       |\n\n## [**NodalAnalysis.mlx**](./Scripts/NodalAnalysis.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_4.png\" width=\"171\" alt=\"image_4.png\"\u003e \u003cbr\u003e  | • Use nodal analysis to compute voltages. \u003cbr\u003e • Solve the matrix form of circuit equations in MATLAB. \u003cbr\u003e • Model and analyze linear circuits in Simscape. \u003cbr\u003e  | • Electrical Engineering \u003cbr\u003e   |\n|      |      |       |\n\n## [**TheveninNorton.mlx**](./Scripts/TheveninNorton.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_5.png\" width=\"171\" alt=\"image_5.png\"\u003e \u003cbr\u003e  | • Explain Thevenin and Norton equivalent circuits. \u003cbr\u003e • Solve for Thevenin and Norton equivalents. \u003cbr\u003e • Compare circuits to their Thevenin and Norton equivalents. \u003cbr\u003e  | • Electrical Engineering \u003cbr\u003e   |\n|      |      |       |\n\n## [**RCCircuits.mlx**](./Scripts/RCCircuits.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_6.png\" width=\"171\" alt=\"image_6.png\"\u003e \u003cbr\u003e  | • Simulate charging and discharging RC circuits. \u003cbr\u003e • Plot solutions of RC circuit differential equations. \u003cbr\u003e • Measure the time constant of an RC circuit. \u003cbr\u003e  | • Electrical Engineering \u003cbr\u003e   |\n|      |      |       |\n\n## [**RLCCircuits.mlx**](./Scripts/RLCCircuits.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_7.png\" width=\"171\" alt=\"image_7.png\"\u003e \u003cbr\u003e  | • Compare the response of first and second order circuits. \u003cbr\u003e • Analyze a second order RLC circuit differential equation. \u003cbr\u003e • Solve for the natural frequency and damping in an RLC circuit. \u003cbr\u003e • Compare underdamped, overdamped, and critically damped circuits. \u003cbr\u003e  | • Electrical Engineering \u003cbr\u003e   |\n|      |      |       |\n\n## [**OpAmps.mlx**](./Scripts/OpAmps.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_8.png\" width=\"171\" alt=\"image_8.png\"\u003e \u003cbr\u003e  | • Describe the open\\-loop behavior of an op amp. \u003cbr\u003e • Compare ideal and non\\-ideal op amp behavior. \u003cbr\u003e • Analyze negative feedback op amp circuits. \u003cbr\u003e • Design circuits using combinations of basic op amp circuits. \u003cbr\u003e  | • Electrical Engineering \u003cbr\u003e   |\n|      |      |       |\n\n# How\\-To Videos\n\nThese short videos demonstrate some of the basic techniques used to simulate and measure circuits in the module.\n\n-  [Building a Circuit](https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis/wiki/Building-a-Circuit) \n-  [Analyzing with a Multimeter](https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis/wiki/Analyzing-with-a-Multimeter) \n-  [Demonstrating Oscilloscope Operation](https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis/wiki/Demonstrating-Oscilloscope-Operation) \n\n# License\n\nThe license for this module is available in the [LICENSE.md](https://github.com/MathWorks-Teaching-Resources/DC-Circuit-Analysis/blob/release/LICENSE.md).\n\n\n# Related Courseware Modules\n\nFeel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22\u0026sort=downloads_desc_30d).\n\n# Educator Resources\n-  [Educator Page](https://www.mathworks.com/academia/educators.html) \n\n# Contribute \n\nLooking for more? Find an issue? Have a suggestion? Please contact the [MathWorks teaching resources 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/DC-Circuit-Analysis/blob/release/CONTRIBUTING.md) page on GitHub.\n\n\n *©* Copyright 2023 The MathWorks™, Inc\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fdc-circuit-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-teaching-resources%2Fdc-circuit-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fdc-circuit-analysis/lists"}