Application examples that show how to get started with Symbolic Math Toolbox™ for first-principles analysis and to re-use this work in downstream numerical workflows. Start by deriving closed-form models, perform parameter sweeps and linearize, then generate MATLAB® functions, Simulink® function blocks, or Simscape™ equations for use in engineering workflows.
Each example is self-contained and runs as a MATLAB live script.
To learn or refresh your knowledge of Symbolic Math Toolbox, there is free self-paced onramp training.
| Example | Domain | Description | Other Toolboxes |
|---|---|---|---|
| SpacecraftAttitudeSlew | Aerospace | Spacecraft slew maneuver planning — Euler's equations to eigenaxis dynamics, bang-bang and trapezoidal profiles via dsolve, parametric slew time, sensitivity to inertia/actuator degradation with vpa verification, and multi-target scheduling |
Aerospace Toolbox |
| LinearizedFlightDynamics | Aerospace | Longitudinal flight dynamics — symbolic Jacobian linearization, stability derivative decomposition, piecewise transonic model, and uncertainty propagation via analytic sensitivity reuse | Aerospace Toolbox, Statistics and Machine Learning Toolbox™ |
| HybridElectricAircraftRange | Aerospace | Hybrid-electric aircraft range equation — symbolic derivation, energy-split optimization, analytic sensitivities, and Monte Carlo range certification | Statistics and Machine Learning Toolbox |
| OrbitalRendezvous | Aerospace | Orbital rendezvous maneuver planning — Clohessy-Wiltshire analytic solution via dsolve, two-impulse delta-v as symbolic functions of timing and geometry, safety ellipses, sensitivity Jacobian, and Monte Carlo dispersion analysis |
— |
| DCMotorSpeedAdaptive | Automotive | Adaptive DC motor speed control — symbolic state feedback gains as functions of load inertia, from 4-state drivetrain model through pole placement to Simulink deployment | Control System Toolbox™, Simulink |
| EVBatterySOCEstimation | Automotive | EV battery equivalent circuit and SOC estimation — Thevenin 2-RC model, Laplace-domain impedance with partial fractions, Taylor-expanded OCV for EKF observability, and C code generation for third-party tools | — |
| QuarterCarActiveSuspension | Automotive | Quarter-car active suspension — 2-DOF symbolic transfer functions, closed-form passive damping tradeoff via partial fractions, skyhook controller design, and eigenvalue-based stability analysis | Control System Toolbox |
| FedBatchBioreactorKinetics | Chemical Engineering | Fed-batch bioreactor kinetics — Michaelis-Menten/Monod rate-law derivation, unit-checked fed-batch balances, generated RHS/Jacobian/productivity functions, local linearization, SimBiology rate-law handoff, and productivity trade study | Optional: SimBiology®, Control System Toolbox |
| ReliefValveSizing | Chemical Engineering | Relief valve sizing — symbolic ideal-gas choked/subcritical flow derivation, mixed-unit audits, area sensitivities, generated sizing functions, standard-orifice selection, upset-scenario screening, and Simscape Fluids handoff | Optional: Simulink, Simscape Fluids™ |
| BlackScholesGreeks | Financial | Black-Scholes Greeks from first principles — PDE verification, exact first- and second-order Greeks, near-ATM Taylor approximations, digital option limits, multi-asset cross-Greeks via Jacobian, and Monte Carlo with exact sensitivities | Financial Toolbox™ |
| SymbolicEconomicDynamics | Financial | Macro-financial recurrence solving — closed-form capital paths, Solow growth convergence, and analytic sensitivities for Monte Carlo stress testing | Statistics and Machine Learning Toolbox |
| ISACWaveformDesign | Wireless | OFDM ISAC waveform design — cross-ambiguity function, Cramér-Rao bound, and Shannon throughput as closed-form functions of pilot fraction, with Zadoff-Chu pilot sequence design | Communications Toolbox™, Signal Processing Toolbox™ |
| RadarKnifeEdgeDiffraction | Wireless | Radar target tracking with Fresnel knife-edge diffraction channel model — over-the-horizon propagation via symbolic Fresnel integrals, waveform design, signal processing, and target classification | Signal Processing Toolbox |
| UnderwaterAcousticChannel | Wireless | Underwater acoustic channel model — symbolic Thorp absorption, Nakagami fading SER, capacity-limited code rate, then fail-and-fix simulation validation with Communications Toolbox | Communications Toolbox, Statistics and Machine Learning Toolbox |
| SerialManipulatorDynamics | Robotics | Serial manipulator kinematics and dynamics — DH forward/inverse kinematics, geometric Jacobian, Lagrangian dynamics (M, C, G decomposition), computed-torque controller, and tracking simulation | Robotics System Toolbox™ |
Each example follows the same workflow:
- Model from first principles — declare physical parameters as symbolic variables and derive the governing equations
- Analyze symbolically — simplify, solve, differentiate, or integrate to obtain closed-form results (transfer functions, sensitivities, design equations, stability conditions)
- Export code and models — substitute known numeric parameters and generate executable MATLAB functions or C code
- Validate numerically — the generated functions are used directly in simulations, Monte Carlo engines, Simulink models, etc
The symbolic derivation and the deployed code stay in sync, so changing an assumption upstream can be automatically propagated downstream.
- MATLAB R2024b or later (R2025a+ for some examples)
- Symbolic Math Toolbox (all examples)
- Additional toolboxes as listed in the table above and in each example's README
- Open MATLAB and navigate to the example's directory
- Open the
.mfile as a Live Script - Run section by section, or run all — each example is self-contained
Some examples generate additional .m files at runtime via matlabFunction. These are written to the example's directory and are gitignored.
See license.txt for details. Copyright (c) 2026, The MathWorks, Inc.