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:
Normalization

Subject: Normalization

From: Desert Hike

Date: 10 Feb, 2011 22:20:06

Message: 1 of 7

I have a data set of time vs. Intensity. Is there quick way to normalize this data set, such that the area under the curve is 1. Perhaps a very stupid question, but any leads are much appreciated.

Subject: Normalization

From: TideMan

Date: 11 Feb, 2011 00:19:36

Message: 2 of 7

On Feb 11, 11:20 am, "Desert Hike" <deserth...@gmail.com> wrote:
> I have a data set of time vs. Intensity. Is there quick way to normalize this data set, such that the area under the curve is 1. Perhaps a very stupid question, but any leads are much appreciated.

It's not a stupid question.
What it is is lacking in detail:
1. Are the t equispaced?
2. You say the area is to be unity, but how does that work in terms
of units? e.g., if time is in seconds and intensity is in N/m^2, then
the area will be N-s /m^2. How can that be unity?

Subject: Normalization

From: Desert Hike

Date: 11 Feb, 2011 07:27:04

Message: 3 of 7

TideMan <mulgor@gmail.com> wrote in message <a46ea46e-5c58-4ff2-8833-6fcf91c951d5@d23g2000prj.googlegroups.com>...
> On Feb 11, 11:20 am, "Desert Hike" <deserth...@gmail.com> wrote:
> > I have a data set of time vs. Intensity. Is there quick way to normalize this data set, such that the area under the curve is 1. Perhaps a very stupid question, but any leads are much appreciated.
>
> It's not a stupid question.
> What it is is lacking in detail:
> 1. Are the t equispaced?
> 2. You say the area is to be unity, but how does that work in terms
> of units? e.g., if time is in seconds and intensity is in N/m^2, then
> the area will be N-s /m^2. How can that be unity?

Thanks for your response and apologies for being a bit vague. So basically what I have is a step-response of my instrument (I vs. t). I differentiate this to get an impulse response (dI/dt). Now I want to be able to convolve this impulse response with an arbitrary input to generate the output.
If I normalize the impulse response such that the area under the curve is 1, the the output maintains the same amplitudes as the input (except that now it is convolved).
To answer your specific question:
1. Yes, t is equispaced.
2. For the units: since its the area for the impulse response, so that is (dI/dt)*dt = I should be 1.
Basically, as I said before, I don't know how to quickly implement a code so as to normalise a data-set of x,y values.
Thanks again!

Subject: Normalization

From: Torsten Hennig

Date: 11 Feb, 2011 07:59:30

Message: 4 of 7

> TideMan <mulgor@gmail.com> wrote in message
> <a46ea46e-5c58-4ff2-8833-6fcf91c951d5@d23g2000prj.goog
> legroups.com>...
> > On Feb 11, 11:20 am, "Desert Hike"
> <deserth...@gmail.com> wrote:
> > > I have a data set of time vs. Intensity. Is there
> quick way to normalize this data set, such that the
> area under the curve is 1. Perhaps a very stupid
> question, but any leads are much appreciated.
> >
> > It's not a stupid question.
> > What it is is lacking in detail:
> > 1. Are the t equispaced?
> > 2. You say the area is to be unity, but how does
> that work in terms
> > of units? e.g., if time is in seconds and
> intensity is in N/m^2, then
> > the area will be N-s /m^2. How can that be unity?
>
> Thanks for your response and apologies for being a
> bit vague. So basically what I have is a
> step-response of my instrument (I vs. t). I
> differentiate this to get an impulse response
> (dI/dt). Now I want to be able to convolve this
> impulse response with an arbitrary input to generate
> the output.
> If I normalize the impulse response such that the
> area under the curve is 1, the the output maintains
> the same amplitudes as the input (except that now it
> is convolved).
> To answer your specific question:
> 1. Yes, t is equispaced.
> 2. For the units: since its the area for the impulse
> response, so that is (dI/dt)*dt = I should be 1.
> Basically, as I said before, I don't know how to
> quickly implement a code so as to normalise a
> data-set of x,y values.
> Thanks again!

ynorm=y./trapz(x,y) ?

Best wishes
Torsten.

Subject: Normalization

From: Desert Hike

Date: 11 Feb, 2011 10:09:04

Message: 5 of 7

Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <1260114039.75890.1297411202212.JavaMail.root@gallium.mathforum.org>...
> > TideMan <mulgor@gmail.com> wrote in message
> > <a46ea46e-5c58-4ff2-8833-6fcf91c951d5@d23g2000prj.goog
> > legroups.com>...
> > > On Feb 11, 11:20 am, "Desert Hike"
> > <deserth...@gmail.com> wrote:
> > > > I have a data set of time vs. Intensity. Is there
> > quick way to normalize this data set, such that the
> > area under the curve is 1. Perhaps a very stupid
> > question, but any leads are much appreciated.
> > >
> > > It's not a stupid question.
> > > What it is is lacking in detail:
> > > 1. Are the t equispaced?
> > > 2. You say the area is to be unity, but how does
> > that work in terms
> > > of units? e.g., if time is in seconds and
> > intensity is in N/m^2, then
> > > the area will be N-s /m^2. How can that be unity?
> >
> > Thanks for your response and apologies for being a
> > bit vague. So basically what I have is a
> > step-response of my instrument (I vs. t). I
> > differentiate this to get an impulse response
> > (dI/dt). Now I want to be able to convolve this
> > impulse response with an arbitrary input to generate
> > the output.
> > If I normalize the impulse response such that the
> > area under the curve is 1, the the output maintains
> > the same amplitudes as the input (except that now it
> > is convolved).
> > To answer your specific question:
> > 1. Yes, t is equispaced.
> > 2. For the units: since its the area for the impulse
> > response, so that is (dI/dt)*dt = I should be 1.
> > Basically, as I said before, I don't know how to
> > quickly implement a code so as to normalise a
> > data-set of x,y values.
> > Thanks again!
>
> ynorm=y./trapz(x,y) ?
>
> Best wishes
> Torsten.


Works! Thanks very much !

Subject: Normalization

From: Desert Hike

Date: 11 Feb, 2011 21:40:23

Message: 6 of 7

"Desert Hike" <deserthike@gmail.com> wrote in message <ij31s0$b96$1@fred.mathworks.com>...
> Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <1260114039.75890.1297411202212.JavaMail.root@gallium.mathforum.org>...
> > > TideMan <mulgor@gmail.com> wrote in message
> > > <a46ea46e-5c58-4ff2-8833-6fcf91c951d5@d23g2000prj.goog
> > > legroups.com>...
> > > > On Feb 11, 11:20 am, "Desert Hike"
> > > <deserth...@gmail.com> wrote:
> > > > > I have a data set of time vs. Intensity. Is there
> > > quick way to normalize this data set, such that the
> > > area under the curve is 1. Perhaps a very stupid
> > > question, but any leads are much appreciated.
> > > >
> > > > It's not a stupid question.
> > > > What it is is lacking in detail:
> > > > 1. Are the t equispaced?
> > > > 2. You say the area is to be unity, but how does
> > > that work in terms
> > > > of units? e.g., if time is in seconds and
> > > intensity is in N/m^2, then
> > > > the area will be N-s /m^2. How can that be unity?
> > >
> > > Thanks for your response and apologies for being a
> > > bit vague. So basically what I have is a
> > > step-response of my instrument (I vs. t). I
> > > differentiate this to get an impulse response
> > > (dI/dt). Now I want to be able to convolve this
> > > impulse response with an arbitrary input to generate
> > > the output.
> > > If I normalize the impulse response such that the
> > > area under the curve is 1, the the output maintains
> > > the same amplitudes as the input (except that now it
> > > is convolved).
> > > To answer your specific question:
> > > 1. Yes, t is equispaced.
> > > 2. For the units: since its the area for the impulse
> > > response, so that is (dI/dt)*dt = I should be 1.
> > > Basically, as I said before, I don't know how to
> > > quickly implement a code so as to normalise a
> > > data-set of x,y values.
> > > Thanks again!
> >
> > ynorm=y./trapz(x,y) ?
> >
> > Best wishes
> > Torsten.
>
>
> Works! Thanks very much !


Btw, how would this work is x was not evenly spaced? if I am correct, trapz (x,y) only works well when x is evenly spaced.

Subject: Normalization

From: Steven_Lord

Date: 14 Feb, 2011 02:15:24

Message: 7 of 7



"Desert Hike" <deserthike@gmail.com> wrote in message
news:ij4ac7$d$1@fred.mathworks.com...

*snip*

> Btw, how would this work is x was not evenly spaced? if I am correct,
> trapz (x,y) only works well when x is evenly spaced.

Why do you think that?

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

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