2010-03-01 19:50:42 +00:00
|
|
|
%close all;
|
|
|
|
clear all;
|
|
|
|
clc
|
|
|
|
|
|
|
|
tmp = load('../tmp/u1');
|
|
|
|
|
|
|
|
t = tmp(:,1);
|
|
|
|
u = tmp(:,2);
|
|
|
|
|
|
|
|
L=numel(t);
|
|
|
|
|
|
|
|
subplot(2,1,1);
|
|
|
|
plot(t,u);
|
2010-03-02 13:54:50 +00:00
|
|
|
grid on;
|
2010-03-01 19:50:42 +00:00
|
|
|
|
|
|
|
dt=t(2)-t(1);
|
|
|
|
|
|
|
|
f = (1:L)/L/dt;
|
|
|
|
fu = fft(u)/L;
|
|
|
|
subplot(2,1,2);
|
|
|
|
plot(f(1:L/2),abs(fu(1:L/2)));
|
2010-03-02 13:54:50 +00:00
|
|
|
grid on;
|
2010-03-01 19:50:42 +00:00
|
|
|
|