GUI for step response of a differential equation system

Updated GUI version of earlier submitted function Step_ODE(fhan, Solver, t_s, t_t, Val_ini, Val_fin, ini)
75 Downloads
Updated 22 Dec 2018

View License

Responses to step inputs are frequently evaluated in process control either to model disturbances or to tune controllers. While Matlab has options to generate step response for linear systems, there seems to be no function to generate the step responses for non-linear ODE systems coded in Matlab (although this can be done in Simulink). The GUI enables the response of the differential equation system (linear/non-linear) states to the step changes in the parameters/inputs of the model. Options to plot and save the results are provided.

Description of GUI components:
------------------------------

Total simulation time
Stepping time - Time at which the step is applied
Initial values of inputs/parameters - Vector (of length equal to number of inputs/parameters) for initial values of inputs/parameters before step
Final values of inputs/parameters - Vector (of length equal to number of inputs/parameters) for final values of inputs/parameters after step
Initial value vector - Vector (of length equal to number of states) for the initial values of differential equation states
Differential equation function name - Name of function containing the diff. eqns.
Solver - Name of the ODE solver to be used
File name - Name of the file to save the data (can be .txt, .dat, .csv, .xls, .xlsm or .xlsx)

The GUI works on differential equations coded as a function with parameters/inputs supplied as function input arguments.

An example function with 2 states and 2 inputs/parameters follows.

function dydt = myfun(~,y, Lam)
dydt = zeros(2,1);
dydt(1) = -Lam(1) * y(1) + 5 ;
dydt(2) = -Lam(2) * y(2) + 10 * y(1);
end

Periasamy Vijay
22/12/2018

Cite As

Vijay Periasamy (2024). GUI for step response of a differential equation system (https://www.mathworks.com/matlabcentral/fileexchange/69803-gui-for-step-response-of-a-differential-equation-system), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0