Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] Reasons to Choose a Specific FFT Formula

Status
Not open for further replies.

sona_

Junior Member level 1
Joined
Nov 23, 2014
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
139
hello
m a newbie on delsig..can anyone tell
(1) why formula chosen is y = 4*sin(2*pi*tone_bin/Nfft*t);for sine wave
(2) why is t chosen as t = [0:Nfft-1] why not t = [0:Nfft];
thanks all
 

Because 0:nfft will be 1 greater than desired. zero is, in fact, a number. If you count from zero to one, that's two numbers, not 1.
 
  • Like
Reactions: sona_

    sona_

    Points: 2
    Helpful Answer Positive Rating
yes...got the answer...and what about the formulae for sine wave
 

the input as y = 4*sin(2*pi*tone_bin/Nfft*t); why is the frequency chosen as tone bin/nfft

I have no idea. You start out asking about FFTs, and then you post a single equation which has nothing to do, as far as I can tell, with computing an fft.

You have obviously posted one line from a more complex calculation. I'm afraid I've left my mind-reading hat at home.
 

ya i would have posted the complete program..actually i was talking about delsig toolbox in which all sine wave assume the same formulae...one of the example is (which quantizes the sine wave using delsig toolbox)


Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
nLev = 8;          % Number of quantizer levels
M = nLev-1      % Number of steps
Nfft = 2^13;    % Record length 
tone_bin = 31;  % prime wrt Nfft 
t = [0:Nfft-1];
y = 4*sin(2*pi*tone_bin/Nfft*t);
v = ds_quantize(y, nLev);
numOfSamples = 400; 
n=1:numOfSamples;
plot(t(n), y(n), 'b');

 
Last edited by a moderator:

i guess since we want the frequency to be around a certain bin say 31 in above case hence we select tone bin as the frequency to be selected over the entire nfft length...pl correct if i am wrong
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top