Skip to main content
11 events
when toggle format what by license comment
Apr 4, 2020 at 20:04 vote accept rocko445
Apr 4, 2020 at 20:05
Apr 4, 2020 at 19:56 comment added Dan Boschen You can emulate that by inserting zeros in between each of your time domain samples. Insert 3 zeros to extend it out 4x, insert K-1 zeros to extend it out K times. This post may help you further: dsp.stackexchange.com/questions/63427/…
Apr 4, 2020 at 19:54 comment added rocko445 Hello, given the code bellow we have one replica of the signal,but in theory we have a replica every 2*pi, How to create pattern so i could see my data in pi-3pi ,3pi-5pi etc.. Thanks. %start code f1=10; f2=30; f3=70; % twice the sampling rate Fs=2.05*70; % sampling frequency is a bit above 2 times to get all the peaks. Ts=1/Fs; Tn=0:Ts:1; fft_L=length(Tn); y4_samples=10*sin(2*pif1*Tn)+10*sin(2*pif2*Tn)+10*sin(2*pi*f3*Tn); %stem(Tn_new,y4_samples); ff=fft(y4_samples); ff1 = abs(ff/fft_L); fft2 = ff1(1:floor(fft_L/2)+1); f = 2*pi*(0:fft_L/2)/fft_L; plot(f, fft2);
Apr 4, 2020 at 16:00 comment added Dan Boschen You have N samples in the FFT representing the frequencies from $f_s(0:N-1)/N$ where $f_s$ is the sampling rate in Hz, thus each frequency is given in Hz. If you want the normalized radian frequency you would need to use $2\pi(0:N-1)/N$.
Apr 4, 2020 at 15:58 comment added Dan Boschen It is because your f is given in terms of your sampling rate $F_s$ which is also given in cycles/sec (Hz). The $\pi$ in your frequency range in the comment is the normalized radian frequency in units of radians/cycle.
Apr 4, 2020 at 15:53 comment added rocko445 Hello i cant see the logics of the vector "f" which represent our frequency domain. its supposed to be between [-pi,pi] but its not ,code start: ff1 = abs(ff/fft_L); fft2 = ff1(1:floor(fft_L/2)+1); f = Fs*(0:fft_L/2)/fft_L; plot(f, fft2);
Apr 4, 2020 at 15:44 comment added Dan Boschen Yes that is consistent with what I am saying (for a normalized radian frequency of a complex signal). Here $f_N = \pi$ and $f_s = 2\pi$ so for a complex signal $f_{alias} = mod(f,f_s)-\pi$ so in the range of $[-\pi, \pi]$ but for a real signal $f_{alias} = |mod(f,\pi)-\pi|$, right?
Apr 4, 2020 at 15:42 comment added rocko445 from theory our data replicates in the range of [-pi,pi]
Apr 4, 2020 at 14:45 history edited Dan Boschen CC BY-SA 4.0
added 2 characters in body
Apr 3, 2020 at 14:47 history edited Dan Boschen CC BY-SA 4.0
added 236 characters in body
Apr 3, 2020 at 14:42 history answered Dan Boschen CC BY-SA 4.0