How to calculate step response of an differential equation SYMBOLICALLY?

4 views (last 30 days)
Hello,
I have a differential equation as follows:
Here the C_2 is output and C_i is input.
I have to calculate a step response SYMBOLICALLY from this system described by the equation. I'm able to do this with step(transfer function) but this time I want to calculate is symbolically.
Here's what I've made:
syms y t u
syms y(t)
% For prettier results I mark: C_1 = y & C_i = u
% equ = equation in time domain:
equ = (diff(diff(y,t),t))+(7*diff(y,t))+10*y-10*u;
% Let's laplace transform the equation:
EQU = laplace(equ,t,s)
% Calculate step response by multiplying with (1/s) in s-domain:
EQU_step = EQU*(1/s)
% inverse transform:
equ = ilaplace(EQU,s,t)
How ever I have a feeling that there must be more elegant way to do this symbolically. Furthermore I'm not sure if my code is working correctly. Have I done right?
Important part: How do I plot the result in time domain in order to compare the results with the figure that I've got with built-in function: step(transfer function object)?
Thank you of any kind of help!

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!