Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8926

Re: Engineering requests

From roby <roby.nowak@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Engineering requests
Date 2012-03-08 09:43 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jj9uv6$duv$1@smc.vnet.net> (permalink)
References <jiqflj$3o$1@smc.vnet.net>

Show all headers | View raw


On 2 Mrz., 13:49, "McHale, Paul" <Paul.McH...@excelitas.com> wrote:
> So, here are some problems we face, but don't have great answers for in Mathematica.

> 6. ListFFT[].  This is an unusual request.  99% of the data we engineers deal with is evenly spaced sample data.  Most of the FFT activity I have ever seen involves getting the FFT from a list of data and plotting Real[].  Simplified, I know.  Since most of our data is in the form {{t1, sample1},{t2, sample2},{t3, sample3}} the time information is embedded.  In fact, all information is available to perform an FFT.  Just saying it makes life easier.  Could offer options like Results->{Real, Imaginary, Both}

>
> Kind Regards,
> Paul
>


Hi Paul,
by plotting Real[ ] you certainly had plotting Re[ ] in mind which is
not fundamental different form Im[ ],
most of the FFT activity I have ever seen involves getting the FFT
from a list of data and plotting Abs[ ].

Could it be that you are lookoing for spectral amlitude (and or power)
analysis with correct frequency information  ?

the functions below take a 1D list of data samples as first parameter
and a second optional scalar parameter specifying the SamplingPeriod,
they return a spectrum as list of {frequency, amplitude} resp.
{frequency, power} pairs if a SamplingPeriod is specifyed.

FourierSpectrum[ ] first calculates the mathematical spectrum
containing positive as well as negative frequencies.
For real input data one can add the positive and the conjugate of the
negative frequncies to get a physical spectrum of positive only
frequencies.
By this method there is no special treatment neccesary to obtain the
correct DC as well as the correct max. frequency term.
Appears to be more physical than just litter the negative frequencies
and adjust the DC and max. frequency terms.



FourierSpectrum[d_,SampligPeriod_:
False]:=Module[{q2=Quotient[Length[d],2],m2=Mod[Length[d],2]},
  Fourier[d,FourierParameters->{-1,1}]//Join[#[[1;;1]],#[[2;;q2+m2]]
+Conjugate@Reverse@(#[[q2+2;;]]),#[[q2+1;;q2+1-m2]]]&//
  Abs//If[SampligPeriod=!=False,{1/(2 SampligPeriod (Length@# -1))
Range[0,Length@#-1],#}//Transpose, #]&
]

FourierPSpectrum[d_,SampligPeriod_:
False]:=FourierSpectrum[d,SampligPeriod]//If[SampligPeriod=!=False,
{First@#,(Last@#)^2}&/@#,#^2]&



Robert

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Engineering requests "McHale, Paul" <Paul.McHale@excelitas.com> - 2012-03-02 12:49 +0000
  Re: Engineering requests Armand Tamzarian <mike.honeychurch@gmail.com> - 2012-03-03 11:55 +0000
  Re: Engineering requests danl@wolfram.com - 2012-03-03 11:53 +0000
  Re: Engineering requests "McHale, Paul" <Paul.McHale@excelitas.com> - 2012-03-05 07:43 +0000
    Re: Engineering requests danl@wolfram.com - 2012-03-07 10:36 +0000
  Re: Engineering requests roby <roby.nowak@gmail.com> - 2012-03-08 09:43 +0000
  Re: Engineering requests David Bailey <dave@removedbailey.co.uk> - 2012-03-09 11:12 +0000
  Re: Engineering requests "McHale, Paul" <Paul.McHale@excelitas.com> - 2012-03-12 09:08 +0000
  Re: Engineering requests Yves Klett <yves.klett@googlemail.com> - 2012-03-14 05:38 +0000

csiph-web