View difference between Paste ID: BGXghgQv and 2bGE5ND1
SHOW: | | - or go back to the newest paste.
1
function Null = diagonalizacion()
2
 num = [0.0026, 0.12];
3
 den = [1, 0.0026, 0.1];
4
 sys = tf(num, den);
5
6
 [A, B, C, D] = tf2ss(sys);
7
 printf("Raices diferentes\n\n")
8
 roots(den)
9
10
 [E, L] = eig(A);
11
 Ei = inv(E);
12
 printf("Matriz A diagonalizada\n\n")
13
 Ad = Ei*A*E
14
endfunction