How to plot the Unit Step response of a transfer function?

183 次查看(过去 30 天)
I would like to kindly ask how do I plot the Unit Step response, when given the transfer function.
For instance C = any simple transfer function
How would I plot the Unit Step response of this Transfer Function on any given axes
Many thanks in advance.

采纳的回答

DUY Nguyen
DUY Nguyen 2023-3-2
%Hope this could help you!
% Define the transfer function
num = [10 120 660 2280 4730 4600 1600];
den = [1 14 113 628 2379 6350 11115 9800 3200];
sys = tf(num, den);
% Plot the unit step response
step(sys);
% Add title and axis labels
title('Unit Step Response');
xlabel('Time (seconds)');
ylabel('Output');
% Customize the axis
xlim([0 10]); % set x-axis limits
ylim([0 1.2]); % set x-axis limits
grid on; % add grid lines
  3 个评论
Thanh Thuy Duyen Nguyen
if I plot 2 step response function how could I assign color to each plot?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by