0% found this document useful (0 votes)
30 views1 page

S TF G ( (s+3) (s+5) ) / (S (s+7) (s+8) ) T Feedback (G, 1) T 0:0.1:25 U T (Y, T, X) Lsim (T, U, T) Plot (T, Y,, T, U,) Xlabel Ylabel Title

This MATLAB code defines a transfer function G as a rational function of s, forms the feedback system T from G with a gain of 1, generates time vectors t and u, simulates the system response y from input u using lsim, and plots the input and output versus time with different colors and labels the axes and title.

Uploaded by

Naftali Omuhande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

S TF G ( (s+3) (s+5) ) / (S (s+7) (s+8) ) T Feedback (G, 1) T 0:0.1:25 U T (Y, T, X) Lsim (T, U, T) Plot (T, Y,, T, U,) Xlabel Ylabel Title

This MATLAB code defines a transfer function G as a rational function of s, forms the feedback system T from G with a gain of 1, generates time vectors t and u, simulates the system response y from input u using lsim, and plots the input and output versus time with different colors and labels the axes and title.

Uploaded by

Naftali Omuhande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

s = tf('s');

G = ((s+3)*(s+5))/(s*(s+7)*(s+8));
T = feedback(G,1);
t = 0:0.1:25;
u = t;
[y,t,x] = lsim(T,u,t);
plot(t,y,'y',t,u,'m')
xlabel('Time (sec)')
ylabel('Amplitude')
title('Input-purple, Output-yellow')

You might also like