t = linspace(0, 2*pi);
size(t)
x = cos(t); y = sin(t);
A = [3 2; 2 3]
z = A * [x; y];
size(z)
plot(x,y)
axis equal
hold on
plot(z(1,:), z(2,:), 'r')
[autovettori, lambda] = eig(A)
x1 = autovettori(:,1)
x5 = autovettori(:,2)
plot([0;0],x1, 'b')
plot([0,x1(1)], [0,x1(2)], 'b')
plot([0,x5(1)], [0,x5(2)], 'r')
% codice per il metodo delle potenze
help metpot
[lambda, y] = metpot(A, [-1; 1])
help cerchio
hold off
cerchio(i,4)
grid on
hold off
gersh(A)
A
B = [i-2 4+3i 5i; 2i+5 7i 3; 2i+3 3 -i]
gersh(B)
hold off
gersh(B)
% per calcolare l'autovalore 1 di A con lo shift -5
metpot(A-5*eye(2,2),ones(2,1))
metpot(A-5*eye(2,2),[2;4])
quit
# Octave 3.6.2, Wed Nov 28 17:02:49 2012 CET <achilles@achilles-TOSH>
