Amplitude specturm of Discrete Fourier Transform
Show older comments
% 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
Stephen23
on 9 Oct 2015
@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.
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?
Rena Berman
on 24 Jan 2017
(Answers dev) Restored question.
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!