필터 지우기
필터 지우기

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

조회 수: 91 (최근 30일)
Thomas
Thomas 2023년 3월 2일
댓글: Sam Chak 2024년 4월 22일
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
Thanh Thuy Duyen Nguyen 2024년 4월 22일
if I plot 2 step response function how could I assign color to each plot?
Sam Chak
Sam Chak 2024년 4월 22일
You can refer to the example in stepplot.
If you need any further assistance or have any additional questions, please feel free to post a New Question.

댓글을 달려면 로그인하십시오.

추가 답변 (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