MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FWHM, InterpolationFunction & Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80460] Re: [mg80418] FWHM, InterpolationFunction & Solve
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Thu, 23 Aug 2007 01:01:52 -0400 (EDT)
  • References: <200708220839.EAA08527@smc.vnet.net>

On Aug 22, 2007, at 4:39 AM, Mathieu G wrote:

> Hello,
> I have a set of discrete data, representing a peak.
> I would like to compute the Full Width at Half Maximum (FWHM) of  
> this peak.
> For that I would like to know which points correspond to half the  
> peak value.
> SO far I was considering using an interpolating function, but this  
> does
> not seem to work:
>
>
> DataFile = Import["FFT.dat"];
> CleanDataFile = Part[DataFile, 2 ;; Length[DataFile]];
> WorkingData = CleanDataFile[[All, {1, 3}]];
>
> ListLinePlot[WorkingData, PlotRange -> All]
>
> MaximumFFTY = Max[WorkingData[[All, 2]]];
> MaximumFFTPosition = Position[WorkingData, MaximumFFTY][[1, 1]];
> MaximumFFTX = WorkingData[[MaximumFFTPosition, 1]];
>
> DataInterpolation = Interpolation[WorkingData];
>
> Solve[DataInterpolation[x] == MaximumFFTValue/2, x]
>
>
> Can you help me please? How would you do that?

Use FindRoot not Solve:

FindRoot[DataInterpolation[x]==MaximumFFTValue/2,{x,MaximumFFTX}]

But if you have a model for your signal you should fit that with  
FindFit rather than doing interpolation.  At any rate this will only  
work if there is one extremum in your data.

Regards,

Ssezi


  • Prev by Date: Re: Unicode character property (Open, Close, etc)
  • Next by Date: Re: fit a BinomialDistribution to exptl data?
  • Previous by thread: FWHM, InterpolationFunction & Solve
  • Next by thread: RE: FWHM, InterpolationFunction & Solve