Thread Subject: BOX CAR

Subject: BOX CAR

From: guj

Date: 19 Jul, 2009 04:08:01

Message: 1 of 6

can any one tell me how can i apply window on my signal which is 296 sample long, i want to see only 64 samples..how can i apply rectangular window...

and how to plot it with my funtion

I tired RECTWIN(64) but is giving me straight line, and how can i multiply with 296 point signal.

I am new to DSP ..:) still learning the things

Subject: BOX CAR

From: Sprinceana

Date: 19 Jul, 2009 08:57:01

Message: 2 of 6

"guj " <gulatiakshay@gmail.com> wrote in message <h3u671$n0p$1@fred.mathworks.com>...
> can any one tell me how can i apply window on my signal which is 296 sample long, i want to see only 64 samples..how can i apply rectangular window...
>
> and how to plot it with my funtion
>
> I tired RECTWIN(64) but is giving me straight line, and how can i multiply with 296 point signal.
>
> I am new to DSP ..:) still learning the things

You store your 296 sample long on your signal in a variable isn't it?


So you multiply:

reactwin(64) *name_of_variable (which consist of your 296 point signal).


You gave little details a little code and message of errors can guide us to help you quicker!


Michael

Subject: BOX CAR

From: ImageAnalyst

Date: 19 Jul, 2009 14:07:11

Message: 3 of 6

On Jul 19, 4:57 am, "Sprinceana " <mihai...@yahoo.com> wrote:
> "guj " <gulatiaks...@gmail.com> wrote in message <h3u671$n0...@fred.mathworks.com>...
> > can any one tell me how can i apply window on my signal which is 296 sample long, i want to see only 64 samples..how can i apply rectangular window...
>
> > and how to plot it with my funtion
>
> > I tired RECTWIN(64) but is giving me straight line, and how can i multiply with 296 point signal.
>
> > I am new to DSP ..:) still learning the things
>
> You store your 296 sample long on your signal in a variable isn't it?
>
> So you multiply:
>
> reactwin(64) *name_of_variable (which consist of your 296 point signal).
>
> You gave little details a little code and message of errors can guide us to help you quicker!
>
> Michael

------------------------------------------------------------------
Yeah, you think that's going to work??? The only way to do the
multiplication is if the arrays are the same size, Or multiply just
part of the longer one like this:
a=1:64
b=1:296
c=a .* b(1:length(a))

Or possibly they're thinking about a sliding window sort of thing,
like convolution, conv().

But you're right in that they really haven't given enough information
to give a decent answer.
Regards,
ImageAnalyst

Subject: BOX CAR

From: guj

Date: 21 Jul, 2009 18:06:06

Message: 4 of 6

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <c0146ddf-ae3f-4264-946b-2b85e4ff4c43@s31g2000yqs.googlegroups.com>...
> On Jul 19, 4:57?am, "Sprinceana " <mihai...@yahoo.com> wrote:
> > "guj " <gulatiaks...@gmail.com> wrote in message <h3u671$n0...@fred.mathworks.com>...
> > > can any one tell me how can i apply window on my signal which is 296 sample long, i want to see only 64 samples..how can i apply rectangular window...
> >
> > > and how to plot it with my funtion
> >
> > > I tired RECTWIN(64) but is giving me straight line, and how can i multiply with 296 point signal.
> >
> > > I am new to DSP ..:) still learning the things
> >
> > You store your 296 sample long on your signal in a variable isn't it?
> >
> > So you multiply:
> >
> > reactwin(64) *name_of_variable (which consist of your 296 point signal).
> >
> > You gave little details a little code and message of errors can guide us to help you quicker!
> >
> > Michael
>
> ------------------------------------------------------------------
> Yeah, you think that's going to work??? The only way to do the
> multiplication is if the arrays are the same size, Or multiply just
> part of the longer one like this:
> a=1:64
> b=1:296
> c=a .* b(1:length(a))
>
> Or possibly they're thinking about a sliding window sort of thing,
> like convolution, conv().


>
> But you're right in that they really haven't given enough information
> to give a decent answer.
> Regards,
> ImageAnalyst






Lets see it like that

I have s which is a spectra signal length a, w another signal spectra of length b when i convolve spectra of both of them i get y=s*w..Now y has length a+b-1.......So for getting s back i need to apply low pass filter...say a rectangular function.....RECTWIN (in matlab)....

If i apply some thing like
y.*RECTWIN(length(s)) it wont work as they r of not equal size...so how will i apply it..am i clear now ...this question seem to trivial but i dont understand

Subject: BOX CAR

From: ImageAnalyst

Date: 22 Jul, 2009 03:17:33

Message: 5 of 6

On Jul 21, 2:06 pm, "guj " <gulatiaks...@gmail.com> wrote:
> ImageAnalyst <imageanal...@mailinator.com> wrote in message <c0146ddf-ae3f-4264-946b-2b85e4ff4...@s31g2000yqs.googlegroups.com>...
> > On Jul 19, 4:57?am, "Sprinceana " <mihai...@yahoo.com> wrote:
> > > "guj " <gulatiaks...@gmail.com> wrote in message <h3u671$n0...@fred.mathworks.com>...
> > > > can any one tell me how can i apply window on my signal which is 296 sample long, i want to see only 64 samples..how can i apply rectangular window...
>
> > > > and how to plot it with my funtion
>
> > > > I tired RECTWIN(64) but is giving me straight line, and how can i multiply with 296 point signal.
>
> > > > I am new to DSP ..:) still learning the things
>
> > > You store your 296 sample long on your signal in a variable isn't it?
>
> > > So you multiply:
>
> > > reactwin(64) *name_of_variable (which consist of your 296 point signal).
>
> > > You gave little details a little code and message of errors can guide us to help you quicker!
>
> > > Michael
>
> > ------------------------------------------------------------------
> > Yeah, you think that's going to work???  The only way to do the
> > multiplication is if the arrays are the same size, Or multiply just
> > part of the longer one like this:
> > a=1:64
> > b=1:296
> > c=a .* b(1:length(a))
>
> > Or possibly they're thinking about a sliding window sort of thing,
> > like convolution, conv().
>
> > But you're right in that they really haven't given enough information
> > to give a decent answer.
> > Regards,
> > ImageAnalyst
>
> Lets  see it like that
>
> I have s which is a spectra signal length a, w another signal spectra of length b when i convolve spectra of both of them i get y=s*w..Now y has length a+b-1.......So for getting s back i need to apply low pass filter...say a rectangular function.....RECTWIN (in matlab)....
>
> If i apply some thing like
> y.*RECTWIN(length(s)) it wont work as they r of not equal size...so how will i apply it..am i clear now ...this question seem to trivial but i dont understand- Hide quoted text -
>
-----------------------------------------------------------------------
Don't use rectwin, and you certainly don't use a low pass filter to
extract a part of a signal (that would just mess up your convolution -
change it's shape). You just use regular indexing.
For example if you signal is 100 long and your kernel is 11 long, the
convolution will be 111 long. If you want the central 100 out of it,
just say
sameSizeSignal = convolutionResult(6:105);
Good luck,
ImageAnalyst

Subject: BOX CAR

From: guj

Date: 22 Jul, 2009 05:24:04

Message: 6 of 6

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <2121bfee-538d-4585-8c87-6d14651e416c@o36g2000vbl.googlegroups.com>...
> On Jul 21, 2:06?pm, "guj " <gulatiaks...@gmail.com> wrote:
> > ImageAnalyst <imageanal...@mailinator.com> wrote in message <c0146ddf-ae3f-4264-946b-2b85e4ff4...@s31g2000yqs.googlegroups.com>...
> > > On Jul 19, 4:57?am, "Sprinceana " <mihai...@yahoo.com> wrote:
> > > > "guj " <gulatiaks...@gmail.com> wrote in message <h3u671$n0...@fred.mathworks.com>...
> > > > > can any one tell me how can i apply window on my signal which is 296 sample long, i want to see only 64 samples..how can i apply rectangular window...
> >
> > > > > and how to plot it with my funtion
> >
> > > > > I tired RECTWIN(64) but is giving me straight line, and how can i multiply with 296 point signal.
> >
> > > > > I am new to DSP ..:) still learning the things
> >
> > > > You store your 296 sample long on your signal in a variable isn't it?
> >
> > > > So you multiply:
> >
> > > > reactwin(64) *name_of_variable (which consist of your 296 point signal).
> >
> > > > You gave little details a little code and message of errors can guide us to help you quicker!
> >
> > > > Michael
> >
> > > ------------------------------------------------------------------
> > > Yeah, you think that's going to work??? ?The only way to do the
> > > multiplication is if the arrays are the same size, Or multiply just
> > > part of the longer one like this:
> > > a=1:64
> > > b=1:296
> > > c=a .* b(1:length(a))
> >
> > > Or possibly they're thinking about a sliding window sort of thing,
> > > like convolution, conv().
> >
> > > But you're right in that they really haven't given enough information
> > > to give a decent answer.
> > > Regards,
> > > ImageAnalyst
> >
> > Lets ?see it like that
> >
> > I have s which is a spectra signal length a, w another signal spectra of length b when i convolve spectra of both of them i get y=s*w..Now y has length a+b-1.......So for getting s back i need to apply low pass filter...say a rectangular function.....RECTWIN (in matlab)....
> >
> > If i apply some thing like
> > y.*RECTWIN(length(s)) it wont work as they r of not equal size...so how will i apply it..am i clear now ...this question seem to trivial but i dont understand- Hide quoted text -
> >
> -----------------------------------------------------------------------
> Don't use rectwin, and you certainly don't use a low pass filter to
> extract a part of a signal (that would just mess up your convolution -
> change it's shape). You just use regular indexing.
> For example if you signal is 100 long and your kernel is 11 long, the
> convolution will be 111 long. If you want the central 100 out of it,
> just say
> sameSizeSignal = convolutionResult(6:105);
> Good luck,
> ImageAnalyst


i think convolution will be 110 in length and genrally when we use funtion like box car to reconsruct a signal back in fourier domain (i am not sure though)

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
rectangular window Sprinceana 19 Jul, 2009 04:59:06
rectwin Sprinceana 19 Jul, 2009 04:59:06
reference Sprinceana 19 Jul, 2009 04:59:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com