understanding cycle sample expression

1 visualizzazione (ultimi 30 giorni)
fima v
fima v il 24 Mar 2020
Commentato: darova il 24 Mar 2020
Hello , I cant understand the logic in this expression "cycles/N = fx/fs"
N is number of samples
fs- frequency if the whole signal of the with all the N periods
what is the meaning of our new frequency fx=(cycles*fs)/N ?
cycles /number of samples has no meaning
Thanks.
% Second example shows how to fix this problem by integer number of cycles.
% best to choose cycles=prime number otherwise quantization noise is periodic and non-randon . cycles/N = fx/fs.
% first select cycles=10 then cycles=11
%%%%%%%%% sampling definitions %%%%%%%%%
fs = 880e3;
N=100;
cycles=11
%%%%%%%%% signal definitions time/frequency %%%%%%%%%
fx = fs*cycles/N %% fx=50e3;
Afs=1;
% time vector
t=linspace(0, (N-1)/fs, N); %t = linspace(0, (N-1)/fs, N);
% input signal
y = Afs * cos(2*pi*fx*t)+0.0*cos(2*pi*5*fx*t);

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by