Electronic circuits in pure MATLAB - using SPICE models
Version 1.0.0 (855 KB) by
Duncan Barclay
Simulate electronic circuits in pure MATLAB - using SPICE syntax and non-linear device models.
This package will simulate a SPICE like netlist using pure MATLAB for operating point, dc sweeps, ac and transient analysis.
I am stating the limitations clearly
- THERE IS NO SCHEMATIC ENTRY FRONT-END
- THIS IT NOT ANYWHERE NEAR FULL SPICE
- THE NETLIST ONLY SUPPORTS A SUBSET OF SPICE SYNTAX
- DC OPERATING POINT ANALYSIS DOES HAVE GMIN OR SOURCE STEPPING
- THE ONLY DOT COMMAND SUPPORTED IS .MODEL
- BJT, DIODE AND MOSFET MODELS HAVE NO TEMPERATURE MODELLING
- BJT, DIODE AND MOSFET MODELS HAVE NO CAPACITANCES
If you don't known what any of those statements mean, or whether your circuit will simulate then this is NOT the package for you. Go and get one of the many other circuit simultor packages such as WR Spice, ngspice or qspice etc.
That said, I believe the Newton-Raphson solver and tranisent angine are robust for worthwhile use - they are derived from the orignal SPICE3F5 code.
This has been written for my enjoyment - ever since I did my doctorate many years ago I've wanted to do this.
The image is a comparison of this simulator and QSPICE on a netlist with some MOSFETs driving a piezo-electric transducer.
Cite As
Duncan Barclay (2025). Electronic circuits in pure MATLAB - using SPICE models (https://www.mathworks.com/matlabcentral/fileexchange/180353-electronic-circuits-in-pure-matlab-using-spice-models), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |