The data file
i get 28400 as the answer but the answer is wrong plus the question want its to 1 dp so i am fairly certain my code is wrong please help
load('data.mat');dt=t(2)-t(1);% t vector has equally spaced t so this seprates t values
N=length(t);F=fft(f,N); %fast fourier transform of f/N
Fshifted=fftshift(F);%place 0 frequency in the centre
Fmag=abs(Fshifted);%magnitude of fshifted
nu_NY=(1/dt)/2;%nquist frequency
nu=linspace(0,nu_NY,N/2+1);%spectrum of frequncy vals associated with FFT frequencies
%adding postive and negative frequncies
F1=Fmag((N/2)+1:N);F2=Fmag(N/2:-1:1);a=[F1,0]+[0,F2];%plotting amplitued vs assoicated frequencies
plot(nu,a)
Best Answer