A = [0 1 2; 1 1 0; 3  2 1]
% fattorizzazione PA = LU
help lu
[L, U, P] = lu(A)
P*A - L*U
help lugauss
lugauss(A)
P = eye(3,3)([2 1 3], :)
B = P * A
C = lugauss(B)
U = triu(C)
tril(C)
tril(C,1)
tril(C,-1)
L = tril(C,-1) + eye(3)
L * U
L * U - B
% trasformata discreta di Fourier (DFT)
x=2*pi/1025*[0:1024];
f=inline('0.5*sin(112*x)-cos(58*x)');
plot(x,f(x))
c=fft(f(x));
size(c)
z=abs(c);
plot(z)
plot(fftshift(z))
find(z>1)
% valore assoluto di c_0
z(1)
s=load('signal1');
% urlwrite('http://www.dm.unibo.it/~achilles/calc/Programmi_CS4a/signal1', 'signal.1');
plot(s)
plot(abs(fft(s)));
quit
# Octave 3.6.4, Mon Dec 02 13:03:24 2013 W. Europe Standard Time <unknown@achilles-TOSH>
