Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
DFT for Irregular samples

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 00:51:02

Message: 1 of 20

Just wondering any body has written DFT for the irregular samples...I wrote a code but its wrong some where !

DFT for irregular samples are based on Reinmann sum method where instead of multiplying with dt we multiply we dt=t(n+1)-t(n-1)/2 and use original sample location t(n) .....Below is what it should be like but its giving wrong results

% In few papers i saw this thing working but below its giving crap results..may be i have written this algorithm in wrong way
clear all
close all
N=200; % Number sample points
M=(N-1)/2; %Number of frequency points
m=-M:M
fo = 4; %frequency of the sine wave
Fs = 50; %sampling rate
Ts = 1/Fs; %sampling time interval
t = 0:Ts:Ts*(N-1); %sampling period
y = 2*sin(2*pi*fo*t);
deltaf=2*pi/(N*Ts);%Defining the grid size of Fourier domain
for k=1:length(m)
        freq = (-j*(2*pi/(N))*(k-1));
        Wnk = exp(freq.*(0:length(t)-1));
        X(k)=Ts*sum(y.*Wnk);
end


if mod(N,2)==0
    k=-N/2:N/2-1; % N even
else
    k=-(N-1)/2:(N-1)/2; % N odd
end

f=1/Ts/N*k;


Y = fft(y);
subplot(211);
stem(f/max(abs(f)),fftshift(abs(X)/max(abs(X))));

title('DFT for Regular sampling')
subplot(212);
stem(f/max(abs(f)),fftshift(abs(Y)/max(abs(Y))));
title('FFT for Regular Sampling')






numberOfIndexes = length(t)
scrambledIndexes = randperm(numberOfIndexes)
halfOfTheIndexes = scrambledIndexes(1:floor(length(scrambledIndexes)/2));
halfOfTheIndexes = sort(halfOfTheIndexes)
yHalf = y(halfOfTheIndexes)
tHalf = t(halfOfTheIndexes)
plot(tHalf, yHalf)
xlabel('tHalf');
ylabel('yHalf');

N1=length(tHalf)

deltax=Ts;
deltak=2*pi/length(tHalf)*deltax;
Period=max(tHalf)-min(tHalf);


deltax_n=zeros(N1,1)
deltax_n(1,:)=(tHalf(1)-(tHalf(N1-1)-Period))/2
deltax_n(N1,:)=(tHalf(N1)-(tHalf(N1-2)-Period))/2

for j=2:N1-1;
    deltax_n(j,:)= deltax_n(j,:)+((tHalf(j+1)-tHalf(j-1))/2)
end


X1 = zeros(size(yHalf));
for k=1:N1
   for j=1:N1
   freq = (-1j*(2*pi/(N1*Ts))*(k-1));
   Wnk = exp(freq.* deltax_n);
   X1(k)=deltax_n(j)*sum(yHalf'.*Wnk);
   end
end



if mod(N1,2)==0
    k=-N1/2:N1/2-1; % N even
else
    k=-(N1-1)/2:(N1-1)/2; % N odd
end

f1=1/Ts/N1*k;
figure(2)
stem(f1/max(abs(f1)),fftshift(abs(X1)/max(abs(X1))))



I apologise if you think that its a trivial problem! But i tried a lot to solve this

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 05:17:02

Message: 2 of 20

Corrected code! Although its still giving me wrong results ! It will be great if some one can have a look on it
In first loop i calculated DFT giving me correct result
In second loop Its DFT for irregular samples


clear all
close all
N=200; % Number sample points
M=(N-1)/2; %Number of frequency points
m=-M:M
fo = 4; %frequency of the sine wave
Fs = 50; %sampling rate
Ts = 1/Fs; %sampling time interval
t = 0:Ts:Ts*(N-1); %sampling period
y = 2*sin(2*pi*fo*t);
deltaf=2*pi/(N*Ts);%Defining the grid size of Fourier domain
for k=1:length(m)
        freq = (-j*(2*pi/(N))*(k-1));
        Wnk = exp(freq.*(0:length(t)-1));
        X(k)=Ts*sum(y.*Wnk);
end


if mod(N,2)==0
    k=-N/2:N/2-1; % N even
else
    k=-(N-1)/2:(N-1)/2; % N odd
end

f=1/Ts/N*k;


Y = fft(y);
subplot(211);
stem(f/max(abs(f)),fftshift(abs(X)/max(abs(X))));

title('DFT for Regular sampling')
subplot(212);
stem(f/max(abs(f)),fftshift(abs(Y)/max(abs(Y))));
title('FFT for Regular Sampling')






numberOfIndexes = length(t)
scrambledIndexes = randperm(numberOfIndexes)
halfOfTheIndexes = scrambledIndexes(1:floor(length(scrambledIndexes)/2));
halfOfTheIndexes = sort(halfOfTheIndexes)
yHalf = y(halfOfTheIndexes)
tHalf = t(halfOfTheIndexes)
plot(tHalf, yHalf)
xlabel('tHalf');
ylabel('yHalf');

N1=length(tHalf)

deltax=Ts;
deltak=2*pi/length(tHalf)*deltax;
Period=max(tHalf)-min(tHalf);


deltax_n=zeros(N1,1)
deltax_n(1,:)=(tHalf(1)-(tHalf(N1-1)-Period))/2
deltax_n(N1,:)=(tHalf(N1)-(tHalf(N1-2)-Period))/2

for j=2:N1-1;
    deltax_n(j,:)= deltax_n(j,:)+((tHalf(j+1)-tHalf(j-1))/2)
end


X1 = zeros(size(yHalf));
for k=1:N1
   for j=1:N1
   freq = (-1j*(2*pi/(N1*Ts))*(k-1));
   Wnk = exp(freq.*tHalf(k));
   X1(k)=deltax_n(j)*sum(yHalf'.*Wnk);
   end
end



if mod(N1,2)==0
    k=-N1/2:N1/2-1; % N even
else
    k=-(N1-1)/2:(N1-1)/2; % N odd
end

f1=1/Ts/N1*k;
figure(2)
stem(f1/max(abs(f1)),fftshift(abs(X1)/max(abs(X1))))

Subject: DFT for Irregular samples

From: Rune Allnor

Date: 21 Feb, 2010 08:11:21

Message: 3 of 20

On 21 Feb, 01:51, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> Just wondering any body has written DFT for the irregular samples...I wrote a code but its wrong some where !
>
> DFT for irregular samples are based on Reinmann sum method where instead of multiplying with dt we multiply we dt=t(n+1)-t(n-1)/2 and use original sample location t(n)

Plain wrong. I don't know what a 'Reinman sum' is, but I assume
you might have misspelled the name 'Riemann'. Now, like it or not,
but that's the kind of trivial mistake, blunder, flaw - call it
what you want - that has proved to be typical of your efforts.

> I apologise if you think that its a trivial problem! But i tried a lot to solve this

It *is* a trivial problem. You only need to understand what you
are doing. But it's utterly totally essential that you *do*
understand the basics.

Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 08:32:04

Message: 4 of 20




I am just trying to code a algorithm, I read in Paper ! And I was seeking some help in coding for that here is the detail of algorithm :

This is for Irregular samples, I am trying to code :

P=sum{n=0:N-1}x(n)exp(j*m*df*x(n))*delta_t

df=2*pi/(N*dt)
m=-M/2:M/2-1 [M is frequency point]

l_{n}=(t_{n}+t_{n-1})/2 is the midpoint between two samples
delta_t=l_(n+1)-l_{n}
delta_t=t_{n+1}-t_{n-1}/2

I am just trying to code above ! If you can tell me how to write it in matlab without blunder that will be great ! I tried above and didnt get the right answer,,,,I wrote a code below for this for missing sin samples but didnt get the answer ...I am sorry if its trivial for you









Rune Allnor <allnor@tele.ntnu.no> wrote in message <24738d11-bf6b-4a3f-98b4-3c25d8fbd791@z35g2000yqd.googlegroups.com>...
> On 21 Feb, 01:51, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Just wondering any body has written DFT for the irregular samples...I wrote a code but its wrong some where !
> >
> > DFT for irregular samples are based on Reinmann sum method where instead of multiplying with dt we multiply we dt=t(n+1)-t(n-1)/2 and use original sample location t(n)
>
> Plain wrong. I don't know what a 'Reinman sum' is, but I assume
> you might have misspelled the name 'Riemann'. Now, like it or not,
> but that's the kind of trivial mistake, blunder, flaw - call it
> what you want - that has proved to be typical of your efforts.
>
> > I apologise if you think that its a trivial problem! But i tried a lot to solve this
>
> It *is* a trivial problem. You only need to understand what you
> are doing. But it's utterly totally essential that you *do*
> understand the basics.
>
> Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 08:47:02

Message: 5 of 20

Correction
 P=sum{n=0:N-1}x(n)exp(j*m*df*t(n))*delta_t

There is t(n) not x(n)....Whole issue is this this algorithm gives best result for irregular samples in most of the IEEE paper i have seen ....And i am sure that i am making some mistake thats why seeking help
"kk KKsingh" <akikumar1983@gmail.com> wrote in message <hlqr24$fc0$1@fred.mathworks.com>...
>
>
>
> I am just trying to code a algorithm, I read in Paper ! And I was seeking some help in coding for that here is the detail of algorithm :
>
> This is for Irregular samples, I am trying to code :
>
> P=sum{n=0:N-1}x(n)exp(j*m*df*x(n))*delta_t
>
> df=2*pi/(N*dt)
> m=-M/2:M/2-1 [M is frequency point]
>
> l_{n}=(t_{n}+t_{n-1})/2 is the midpoint between two samples
> delta_t=l_(n+1)-l_{n}
> delta_t=t_{n+1}-t_{n-1}/2
>
> I am just trying to code above ! If you can tell me how to write it in matlab without blunder that will be great ! I tried above and didnt get the right answer,,,,I wrote a code below for this for missing sin samples but didnt get the answer ...I am sorry if its trivial for you
>
>
>
>
>
>
>
>
>
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <24738d11-bf6b-4a3f-98b4-3c25d8fbd791@z35g2000yqd.googlegroups.com>...
> > On 21 Feb, 01:51, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > > Just wondering any body has written DFT for the irregular samples...I wrote a code but its wrong some where !
> > >
> > > DFT for irregular samples are based on Reinmann sum method where instead of multiplying with dt we multiply we dt=t(n+1)-t(n-1)/2 and use original sample location t(n)
> >
> > Plain wrong. I don't know what a 'Reinman sum' is, but I assume
> > you might have misspelled the name 'Riemann'. Now, like it or not,
> > but that's the kind of trivial mistake, blunder, flaw - call it
> > what you want - that has proved to be typical of your efforts.
> >
> > > I apologise if you think that its a trivial problem! But i tried a lot to solve this
> >
> > It *is* a trivial problem. You only need to understand what you
> > are doing. But it's utterly totally essential that you *do*
> > understand the basics.
> >
> > Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 09:07:05

Message: 6 of 20

Well, I think i am aware of basics but still i will try to correct the DFT basics if i am wrong, But if some body can guide me where i am wrong in writing the code for above ...It will help me a lot





Rune Allnor <allnor@tele.ntnu.no> wrote in message <24738d11-bf6b-4a3f-98b4-3c25d8fbd791@z35g2000yqd.googlegroups.com>...
> On 21 Feb, 01:51, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Just wondering any body has written DFT for the irregular samples...I wrote a code but its wrong some where !
> >
> > DFT for irregular samples are based on Reinmann sum method where instead of multiplying with dt we multiply we dt=t(n+1)-t(n-1)/2 and use original sample location t(n)
>
> Plain wrong. I don't know what a 'Reinman sum' is, but I assume
> you might have misspelled the name 'Riemann'. Now, like it or not,
> but that's the kind of trivial mistake, blunder, flaw - call it
> what you want - that has proved to be typical of your efforts.
>
> > I apologise if you think that its a trivial problem! But i tried a lot to solve this
>
> It *is* a trivial problem. You only need to understand what you
> are doing. But it's utterly totally essential that you *do*
> understand the basics.
>
> Rune

Subject: DFT for Irregular samples

From: Rune Allnor

Date: 21 Feb, 2010 10:12:20

Message: 7 of 20

On 21 Feb, 09:32, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> I am just trying to code a algorithm, I read in Paper !

Don't read the papers. Read the textbooks.

If the paper is old, then the recent textbooks will present
the same material with more easy-to-follow structure and
simpler language.

If the paper is recent, then the authors either don't know
that the material is textbook - which in turn means they
don't know what they are talking about - or they assume
that the reader already know the textbooks.

Either way: Read the textbooks.

Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 17:00:21

Message: 8 of 20

Ok! But it will be great if u can refer some book too! And about concept I saw this in the recent 2007 paper and in 1999 paper too and its not wrong any where .....I am coding it wrong But sure thanks for your advice i will go through books if i can approach for irregular sampling some where






Rune Allnor <allnor@tele.ntnu.no> wrote in message <688e9a23-a71f-4ed1-b97c-67b5b105da07@f29g2000yqa.googlegroups.com>...
> On 21 Feb, 09:32, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > I am just trying to code a algorithm, I read in Paper !
>
> Don't read the papers. Read the textbooks.
>
> If the paper is old, then the recent textbooks will present
> the same material with more easy-to-follow structure and
> simpler language.
>
> If the paper is recent, then the authors either don't know
> that the material is textbook - which in turn means they
> don't know what they are talking about - or they assume
> that the reader already know the textbooks.
>
> Either way: Read the textbooks.
>
> Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 17:10:45

Message: 9 of 20



http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/PIRODDI1/NUFT/node4.html

This is information i got for NDFT and it is sample as what i am trying to code only addon is the factor deltat_n which is known as Riemann sum apprach why dont you give a try and code it may be i will be satisfied if it didnt work for u too






Rune Allnor <allnor@tele.ntnu.no> wrote in message <688e9a23-a71f-4ed1-b97c-67b5b105da07@f29g2000yqa.googlegroups.com>...
> On 21 Feb, 09:32, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > I am just trying to code a algorithm, I read in Paper !
>
> Don't read the papers. Read the textbooks.
>
> If the paper is old, then the recent textbooks will present
> the same material with more easy-to-follow structure and
> simpler language.
>
> If the paper is recent, then the authors either don't know
> that the material is textbook - which in turn means they
> don't know what they are talking about - or they assume
> that the reader already know the textbooks.
>
> Either way: Read the textbooks.
>
> Rune

Subject: DFT for Irregular samples

From: TideMan

Date: 21 Feb, 2010 19:00:12

Message: 10 of 20

On Feb 22, 6:10 am, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/PIRODDI1/NUFT...
>
> This is information i got for NDFT and it is sample as what i am trying to code only addon is the factor deltat_n which is known as Riemann sum  apprach why dont you give a try and code it may be i will be satisfied if it didnt work for u too
>
> Rune Allnor <all...@tele.ntnu.no> wrote in message <688e9a23-a71f-4ed1-b97c-67b5b105d...@f29g2000yqa.googlegroups.com>...
> > On 21 Feb, 09:32, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > > I am just trying to code a algorithm, I read in Paper !
>
> > Don't read the papers. Read the textbooks.
>
> > If the paper is old, then the recent textbooks will present
> > the same material with more easy-to-follow structure and
> > simpler language.
>
> > If the paper is recent, then the authors either don't know
> > that the material is textbook - which in turn means they
> > don't know what they are talking about - or they assume
> > that the reader already know the textbooks.
>
> > Either way: Read the textbooks.
>
> > Rune

What you don't seem to realise is that while this is new for you, for
many of us, it is old hat. We've been doing it for years. So we
know, without having to prove it to ourselves or you. And we learnt,
not by continually bugging others, but by knuckling down and figuring
it out for ourselves, using textbooks.

You've posted 30 or so messages this month on this subject.
It's time you did some work for yourself instead of continually asking
questions and expecting others to do your work for you.

Subject: DFT for Irregular samples

From: Rune Allnor

Date: 21 Feb, 2010 20:03:37

Message: 11 of 20

On 21 Feb, 18:00, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> Ok! But it will be great if u can refer some book too!

I'll do better than that; I'll mention two:

Oppenheim and Schafer: Digital Signal Processing (1975)
Papoulis: The Fourier Integral and its Applications (1961)

Your local academic library will have a copy of each.
One just needs to know that a 'library' is a collection
of 'books'. And how to use the books. And what to use
them for.

Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 21 Feb, 2010 20:11:02

Message: 12 of 20

K will do it
Thanks
kk




TideMan <mulgor@gmail.com> wrote in message <b7b3ee88-4946-42a2-91d1-328af827d3f8@v20g2000prb.googlegroups.com>...
> On Feb 22, 6:10 am, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/PIRODDI1/NUFT...
> >
> > This is information i got for NDFT and it is sample as what i am trying to code only addon is the factor deltat_n which is known as Riemann sum  apprach why dont you give a try and code it may be i will be satisfied if it didnt work for u too
> >
> > Rune Allnor <all...@tele.ntnu.no> wrote in message <688e9a23-a71f-4ed1-b97c-67b5b105d...@f29g2000yqa.googlegroups.com>...
> > > On 21 Feb, 09:32, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > > > I am just trying to code a algorithm, I read in Paper !
> >
> > > Don't read the papers. Read the textbooks.
> >
> > > If the paper is old, then the recent textbooks will present
> > > the same material with more easy-to-follow structure and
> > > simpler language.
> >
> > > If the paper is recent, then the authors either don't know
> > > that the material is textbook - which in turn means they
> > > don't know what they are talking about - or they assume
> > > that the reader already know the textbooks.
> >
> > > Either way: Read the textbooks.
> >
> > > Rune
>
> What you don't seem to realise is that while this is new for you, for
> many of us, it is old hat. We've been doing it for years. So we
> know, without having to prove it to ourselves or you. And we learnt,
> not by continually bugging others, but by knuckling down and figuring
> it out for ourselves, using textbooks.
>
> You've posted 30 or so messages this month on this subject.
> It's time you did some work for yourself instead of continually asking
> questions and expecting others to do your work for you.

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 22 Feb, 2010 19:05:21

Message: 13 of 20

Thanks my codes r working now ! But still working only for uniformly sampling not for non uniform samples


Rune Allnor <allnor@tele.ntnu.no> wrote in message <5d7ebc5d-3058-4b6d-b196-fe0eacbe02d9@b7g2000yqd.googlegroups.com>...
> On 21 Feb, 18:00, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Ok! But it will be great if u can refer some book too!
>
> I'll do better than that; I'll mention two:
>
> Oppenheim and Schafer: Digital Signal Processing (1975)
> Papoulis: The Fourier Integral and its Applications (1961)
>
> Your local academic library will have a copy of each.
> One just needs to know that a 'library' is a collection
> of 'books'. And how to use the books. And what to use
> them for.
>
> Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 23 Feb, 2010 16:12:05

Message: 14 of 20


Hello sir,

I have gone through chapters of book you told me. I can easily write a code for uniform sampling and it is giving me correct results.

But when i started writing for non uniform sampling, I am getting error. Following problems are comming

1. X(f) = sum(k=1,N){ deltat *x(k) * exp(-2*pi/max(t)-min(t)*j*t(k)*m }

deltat=t(n+1)-t(n-1)/2
t(0)=(t(N)-Period))
t(1)=(t(1)+Period))

Now when I take frequency axis as 2*pi/N results are fine but when i make it according to fourier theory 2*pi/(b-a) it is giving me wrong results..For NDFT i was follwing this article
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/PIRODDI1/NUFT/node4.html
and deltat concept came from one of the paper, I didnt get it in book. Now since, you were always pointing out that i am making mistake in DFT basics. it will be great if you can point it out

Thanks

kk




Rune Allnor <allnor@tele.ntnu.no> wrote in message <24738d11-bf6b-4a3f-98b4-3c25d8fbd791@z35g2000yqd.googlegroups.com>...
> On 21 Feb, 01:51, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Just wondering any body has written DFT for the irregular samples...I wrote a code but its wrong some where !
> >
> > DFT for irregular samples are based on Reinmann sum method where instead of multiplying with dt we multiply we dt=t(n+1)-t(n-1)/2 and use original sample location t(n)
>
> Plain wrong. I don't know what a 'Reinman sum' is, but I assume
> you might have misspelled the name 'Riemann'. Now, like it or not,
> but that's the kind of trivial mistake, blunder, flaw - call it
> what you want - that has proved to be typical of your efforts.
>
> > I apologise if you think that its a trivial problem! But i tried a lot to solve this
>
> It *is* a trivial problem. You only need to understand what you
> are doing. But it's utterly totally essential that you *do*
> understand the basics.
>
> Rune

Subject: DFT for Irregular samples

From: Rune Allnor

Date: 23 Feb, 2010 16:29:51

Message: 15 of 20

On 23 Feb, 17:12, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> Hello sir,
>
> I have gone through chapters of book you told me. I can easily write a code for uniform sampling and it is giving me correct results.
>
> But when i started writing for non uniform sampling, I am getting error. Following problems are comming

As I said, consult the more recent literature to get the
clear, concise expositions. The first two books, from 1961
and 1975, were meant to indicate what time scales are involved
when I talk about 'old' and 'recent' literature.

The stuff you are looking for can be found in the 1992'ish
edition of the book by Proakis and Manolakis.

But again: You need to know what you are looking for to
find it. Make sure you understand the reguular sampling
case in minute detail!

Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 23 Feb, 2010 16:59:21

Message: 16 of 20


Can you give me your comments on the below :) Both give same results when sampling is uniform

m=-M:M
N=2M+1
For Regular sampling ( Correct results)

for k=1:length(m)
        freq = (-j*(2*pi/(N))*(k-1));
        Wnk = exp(freq.*(0:length(t)-1));
        X(k)=Ts*sum(y.*Wnk);
end

For Irregular Sampling (Incorrect results when i make sampling non uniform, it gives me correct result when its uniform)
m=-M:M
N1=2M+1
deltak=2*pi/(max(t)-min(t))
for k=1:N1
   freq = (i*(deltak)*(k-1));
   Wnk = exp(freq.*(t));
   X1(k)= sum(yHalf.*Wnk.*deltat(k));
end

And, I will surely get the book told by you from libray.

Thanks


Rune Allnor <allnor@tele.ntnu.no> wrote in message <864874f1-eeb7-45b5-b261-6f9e5dee524e@g23g2000vbl.googlegroups.com>...
> On 23 Feb, 17:12, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Hello sir,
> >
> > I have gone through chapters of book you told me. I can easily write a code for uniform sampling and it is giving me correct results.
> >
> > But when i started writing for non uniform sampling, I am getting error. Following problems are comming
>
> As I said, consult the more recent literature to get the
> clear, concise expositions. The first two books, from 1961
> and 1975, were meant to indicate what time scales are involved
> when I talk about 'old' and 'recent' literature.
>
> The stuff you are looking for can be found in the 1992'ish
> edition of the book by Proakis and Manolakis.
>
> But again: You need to know what you are looking for to
> find it. Make sure you understand the reguular sampling
> case in minute detail!
>
> Rune

Subject: DFT for Irregular samples

From: Rune Allnor

Date: 23 Feb, 2010 17:43:37

Message: 17 of 20

On 23 Feb, 17:59, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> Can you give me your comments on the below :)

OK, you are close enough; I won't mess around anymore.
The key is the term Wnk. In the regularly sampled case,
the implicit assumption is that both n and k are integers.
For the irregular case, relax that assumption such that
n and/or k might be any real number.

Next, express the irregular Fourier transform in terms of
a matrix W, where W(i,j) = Wnk = exp(sqrt(-1)*2*pi*f(i)*k(j))
or something like that.

So the crux is to come up with the W matrix that expresses
the transform, which might be irregular in both time and
frequency. The key is Manolakis & Proakis (4th ed., 2007)
equations 7.1.21/7.1.22 where n and k are *not* integers.
In that case you will be able to express the irregularly
sampled FT as a matrix-vector product similar to equation
7.1.26, where you need to modify the matrix W as given
for the regular case in eq 7.1.25.

Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 4 Mar, 2010 10:19:05

Message: 18 of 20


Thank you sir

Rune Allnor <allnor@tele.ntnu.no> wrote in message <2818cbed-68d0-40a3-971d-75b23d2e483e@y26g2000vbb.googlegroups.com>...
> On 23 Feb, 17:59, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Can you give me your comments on the below :)
>
> OK, you are close enough; I won't mess around anymore.
> The key is the term Wnk. In the regularly sampled case,
> the implicit assumption is that both n and k are integers.
> For the irregular case, relax that assumption such that
> n and/or k might be any real number.
>
> Next, express the irregular Fourier transform in terms of
> a matrix W, where W(i,j) = Wnk = exp(sqrt(-1)*2*pi*f(i)*k(j))
> or something like that.
>
> So the crux is to come up with the W matrix that expresses
> the transform, which might be irregular in both time and
> frequency. The key is Manolakis & Proakis (4th ed., 2007)
> equations 7.1.21/7.1.22 where n and k are *not* integers.
> In that case you will be able to express the irregularly
> sampled FT as a matrix-vector product similar to equation
> 7.1.26, where you need to modify the matrix W as given
> for the regular case in eq 7.1.25.
>
> Rune

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 25 Mar, 2010 04:01:20

Message: 19 of 20

Rune Allnor <allnor@tele.ntnu.no> wrote in message <2818cbed-68d0-40a3-971d-75b23d2e483e@y26g2000vbb.googlegroups.com>...
> On 23 Feb, 17:59, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Can you give me your comments on the below :)
>
> OK, you are close enough; I won't mess around anymore.
> The key is the term Wnk. In the regularly sampled case,
> the implicit assumption is that both n and k are integers.
> For the irregular case, relax that assumption such that
> n and/or k might be any real number.
>
> Next, express the irregular Fourier transform in terms of
> a matrix W, where W(i,j) = Wnk = exp(sqrt(-1)*2*pi*f(i)*k(j))
> or something like that.
>
> So the crux is to come up with the W matrix that expresses
> the transform, which might be irregular in both time and
> frequency. The key is Manolakis & Proakis (4th ed., 2007)
> equations 7.1.21/7.1.22 where n and k are *not* integers.
> In that case you will be able to express the irregularly
> sampled FT as a matrix-vector product similar to equation
> 7.1.26, where you need to modify the matrix W as given
> for the regular case in eq 7.1.25.
>
> Rune

you mean some thing like this
if N=500
M=1001 (frequency domain points)

f=(-M/2):(M/2-1); freq axis
for i=1:length(N);
    for j=1:length(M);
Wnk = exp(sqrt(-1)*2*pi*t2(i)*f(j))
    end
end


so Fourier matrix will be irregular matrix , am i right sir

Subject: DFT for Irregular samples

From: kk KKsingh

Date: 23 Jul, 2010 07:22:05

Message: 20 of 20

Rune Allnor <allnor@tele.ntnu.no> wrote in message <864874f1-eeb7-45b5-b261-6f9e5dee524e@g23g2000vbl.googlegroups.com>...
> On 23 Feb, 17:12, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Hello sir,
> >
> > I have gone through chapters of book you told me. I can easily write a code for uniform sampling and it is giving me correct results.
> >
> > But when i started writing for non uniform sampling, I am getting error. Following problems are comming
>
> As I said, consult the more recent literature to get the
> clear, concise expositions. The first two books, from 1961
> and 1975, were meant to indicate what time scales are involved
> when I talk about 'old' and 'recent' literature.
>
> The stuff you are looking for can be found in the 1992'ish
> edition of the book by Proakis and Manolakis.
>
> But again: You need to know what you are looking for to
> find it. Make sure you understand the reguular sampling
> case in minute detail!
>
> Rune

Hi Rune!

I am looking for your reviews on
http://www.mathworks.com/matlabcentral/newsreader/view_thread/287549#764924

Thanks a lot ! Always learned lot from you

KK

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us