Re: FWHM, InterpolationFunction & Solve
- To: mathgroup at smc.vnet.net
- Subject: [mg80653] Re: FWHM, InterpolationFunction & Solve
- From: Mathieu G <ellocomateo at free.fr>
- Date: Tue, 28 Aug 2007 02:09:59 -0400 (EDT)
- References: <200708220839.EAA08527@smc.vnet.net> <faj4md$8p2$1@smc.vnet.net>
Sseziwa Mukasa a =E9crit :
> 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
>
Hi!
Even though I read the documentation I still do not understand the
difference between FindRoot and Solve, can you help?
Regards,
Mathieu
- Follow-Ups:
- Re: Re: FWHM, InterpolationFunction & Solve
- From: Sseziwa Mukasa <mukasa@gmail.com>
- Re: Re: FWHM, InterpolationFunction & Solve
- References:
- FWHM, InterpolationFunction & Solve
- From: Mathieu G <ellocomateo@free.fr>
- FWHM, InterpolationFunction & Solve