"kk KKsingh" <akikumar1983@gmail.com> wrote in message <hmevmt$37t$1@fred.mathworks.com>...
> Although i know with irregular sampling FFT doesnot suppose to give good results. But Can any one can tell me reason for this, in the code below i am taking 6 samples off that is i am missing 11 samples
>
> clear all
> close all
> N=202; % Number sample points
> fo = 10; %frequency of the sine wave
> Fs = 100; %sampling rate
> Ts = 1/Fs; %sampling time interval
> t = 0:Ts:Ts*(N1); %sampling period
> y = 2*sin(2*pi*fo*t);
> y1=y;t1=t;
>
> z=[23 45 67 89 90 123 145 148 175 189 192]
>
> y1(z)=[]
> t1(z)=[]
>
>
> f=fftshift(abs(fft(y1)));
> N=length(y1);
> kx=(N1)/2:(N1)/2; % N odd
> freqaxis1=1/Ts/N*kx;
>
> plot(freqaxis1,f)
>
>
> My question is when i miss more number of samples, I get shift in the spectrum....My values are not at 10 Hz any more....they keep getting shifted when i increase the number of samples..I will be adding FFT with one of my interpolation technique but i cant do this untill i know the reason for shift and remedy fr this ( other than including zeros)
>
> Thanks
>
> kk
Do you have a reference for what you are trying to do?
Is there a pattern to the samples you choose to keep?
If I take random irregular samples from a signal, I would not expect to be able to use the FFT in any simple way.
I know there is oftentimes, no distinction made between the FFT & DFT & "DFT" is used for several different meanings.
With the DFT, that is, individual correlations with complex exponentials, I can calculate components or reconstructions based on any sample or samples I like, always keeping in mind that I will get the reconstruction of what I give it, no more.
With the FFT, there is an assumption of equallyspaces samples in each domain.
So, if I take samples at some other places, then put them into an FFT that assumes that they were equally spaced, I think I have to expect "distortions: in the spectrum.
Do you have some justification for assuming that you can use the FFT at all?
