Amplitude specturm of Discrete Fourier Transform

1 view (last 30 days)
% amplitude specturm of a signal x
clear all; close all; clc;
N = 256; % number of data points
dt = 2*pi/N; % [s] sampling interval
t = 0:dt:(N-1)*dt; % [s] time axis
% -- generate signals in time-domain
x1 = 1.5*sin( 2*pi*2*t ); % 1st signal
x2 = 2*sin( 2*pi*10*t ); % 2nd signal
x3 = 0.5*sin( 2*pi*15*t ); % 3rd signal
x = x1 + x2 + x3; % [V] resulting signal
% -- calculate the spectrum
X( 1:N/2 ) = 0; % Fourier transform
lenX = length( X ); for k = 1:lenX
HELPPPP!! how should i proceed to generate the amplitude specturm WITHOUT using the function fft.
the discrete fourier transform to be used is (Eq.1) view in wiki http://en.wikipedia.org/wiki/Discrete_Fourier_transform btw im a beginner in matlab so please help me :(
  3 Comments
John D'Errico
John D'Errico on 9 Oct 2015
Edited: John D'Errico on 9 Oct 2015
This should be disallowed. Perhaps, once a question has had an accepted answer, the question should no longer be editable by the poser? Or perhaps we should be given the ability to restore the question to the original form?

Sign in to comment.

Accepted Answer

Wayne King
Wayne King on 24 Apr 2013
You should read the help for fft()

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!