Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: how remove unwanted high frequencies in MATLAB?
Replies: 11   Last Post: Apr 23, 2013 3:51 AM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 6,387 Registered: 12/7/04
Re: how remove unwanted high frequencies in MATLAB?
Posted: Apr 23, 2013 12:26 AM

TideMan <mulgor@gmail.com> wrote in message <88197b04-1e39-4769-8bd0-0165f919055e@googlegroups.com>...
> On Tuesday, April 23, 2013 10:59:08 AM UTC+12, ghasem wrote:
> > > Well, when you do the Fourier Series summation, just leave out the components with frequencies greater than f1.
> >
> > ==========================
> >
> > exactly,my problem is here.I want to remove frequencies higher than f1,but I don't know how code it in MATLAB?
> >
> > for example,following code is imperfect.please perfect it.
> >
> > data1 = rand(1,n) % suppose data1 is my data.
> >
> > data2 = dct(data) % data2 is discrete cosine transform of data1.
> >
> >
> >
> > % now!How draw it's figure in discrete frequency domain and leave out f > f1 ?
> >
> > ghasem

>
> Interval in frequency is:
> df=1/(2*N*dt);
> where N is no of data and dt is the interval between data.
> f1 corresponds to index no:
> indx=round(f1/df);
> So, for dct Y:
> Y(indx:end)=0;
> y=idct(Y);

You might want to consider a time domain window to prevent aliasing.

Greg

Date Subject Author
4/22/13 ghasem
4/22/13 ghasem
4/22/13 Derek Goring
4/22/13 ghasem
4/22/13 Derek Goring
4/22/13 ghasem
4/22/13 Derek Goring
4/23/13 Greg Heath
4/23/13 ghasem
4/23/13 ghasem
4/23/13 Derek Goring
4/23/13 ghasem