ode; zero input response; drawing the function in matlab
30 次查看(过去 30 天)
显示 更早的评论
hello
in the context of ordinary differential equations and system modelling, an example of how to determine the zero-input response from a system modelled by q(D) is
for which the answer is supposed to be
So when trying to prove to myself that the resulting plot for q(D) really was a constant 0, I tried this in matlab:
syms x
y = exp(-x) * (cos(2*x) + 2*sin(2*x));
qD = (diff(y) + y)^2 + 4*y;
diffy = diff(y);
hold on
fplot(y, [0 5])
fplot(qD, [0 5])
fplot(diffy, [0 5])
legend ('y', 'qD', 'diffy')
but the resulting curve for 'qD' is anything but 0;
so is my formula for the 'qD' curve wrong? or is the solution to the exercise wrong?
regards, Danny.
0 个评论
采纳的回答
Alan Stevens
2020-11-13
编辑:Alan Stevens
2020-11-13
I think you should interpret (D+1)^2y as D^2y + 2Dy + y; i.e. d^2y/dt^2 + 2dy/dt + y
Currently you have it as (dy/dt)^2 +2dy/dt + y
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!