Professional Documents
Culture Documents
Mat Lab Assignment Cum Test
Mat Lab Assignment Cum Test
Mat Lab Assignment Cum Test
M=0.5;
m=0.23;
a=1/(M+m);
g=9.8;
l=0.321;
x = 3*a/(3*m*l*a - 4*l)
y = 4*a/(4-3*m*a)
xx = (3*g)/(4*l - 3*m*l*a)
yy = (-3*m*a*g)/(4-3*m*a)
a=[0 1 0 0 ;xx 0 0 0; 0 0 0 1;yy 0 0 0];
b = [0; x; 0; y]
c = [1 0 0 0];
% w is (sI-A)^-1
w = inv(s*eye(4) - a);
func = c*w*b
1
hold on;
grid on;
x =
-4.1909
y =
1.7937
xx =
29.9820
yy =
-3.0323
b =
0
-4.1909
0
1.7937
func =
-4.191
------------------------
s^2 - 1.51e-14 s - 29.98
y =
Columns 1 through 13
-25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15
-14 -13
Columns 14 through 26
Columns 27 through 39
2
1 2 3 4 5 6 7 8 9 10 11
12 13
Columns 40 through 51
14 15 16 17 18 19 20 21 22 23 24
25
ans =
RiseTime: 0.1886
SettlingTime: 0.9406
SettlingMin: 0.9486
SettlingMax: 1.1860
Overshoot: 15.4565
Undershoot: 0
Peak: 1.1860
PeakTime: 0.4144
3
Published with MATLAB® R2020a