Amplitude specturm of Discrete Fourier Transform

% 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

@talfryn: please do not delete your questions like this. We are not your private question answering service, and we volunteer our time to help everyone who looks at this forum, not just you. When you delete your question your make our answers meaningless, which means you have stolen our time and our answers from being useful for everyone.
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?
(Answers dev) Restored question.

Sign in to comment.

 Accepted Answer

You should read the help for fft()

1 Comment

i need to generate it without using the built in function fft()

Sign in to comment.

More Answers (0)

Tags

No tags entered yet.

Asked:

on 24 Apr 2013

Commented:

on 24 Jan 2017

Community Treasure Hunt

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

Start Hunting!