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
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');
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