blob: 61cfa6c8e6e83c800cf8d5343227ce2657ae6fa4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clc;
s = %s;
num = poly([-3],'s','roots');
den = poly([-2 -4 -5],'s','roots');
G = num/den;
disp(G,"G(s)=");
disp(laplace(1,t,s),"input is a step function:");
syms t ;
printf("C(s)=G(s)*R(s)=");
K = G/s;
C = syslin('c',K);
disp(C);
[A] = pfss(C);l=0;disp(A);
for k = 1:size(A)
F(k)= ilaplace(A(k),s,t);
l = l+F(k);
end
disp(l,"c(t)=");
|