clear all
close all

load('transient_oscillations.mat')

% generate data example
duration = max(t);
n = duration / dt
fmax=1/dt;

figure(1)
subplot(2,1,1)
plot(t,final)
xlabel('time')
ylabel('data')

subplot(2,1,2)
% compute FT
num_windows=5;
duration_window=duration/num_window;
ft=fft(final);
freq = linspace(0,fmax/2,n/2);
plot(freq(1:500),abs(ft(1:500)))
xlabel('frequency')
ylabel('amplitude power')

