Re: Matlab FFT Calibration Routines
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Mon, 5 May 2008 20:43:02 +0000 (UTC)
In article <fvnqmf$5sv$1@xxxxxxxxxxxxxxxxxx>,
John Costello <JohnCostello@xxxxxxxxxxxxx> wrote:
Does Matlab have a canned set of data for FFT analysis?
What I am trying to find is a Matlab program that takes a
known set of data for a signal, computes the FFT and
extracts the spectral content and RMS equivalents of the
discrete sinusoids used to assimilate the signal...
For example, if we set up a known signal comprised of
f(t) = 5 + 2sin(2*pi*100*t) + 3sin(2*pi*1000*t)
what do we get from the Matlab FFT analysis?
In my recent tests... what you get is something slightly different
than the theoretical results, due to round off errors in calculations
of the sines. The difference is particularily noticable if one computes
in degrees (e.g., 25-ish cycles in 720 degrees stepping by 0.1 degrees)
and almost seemed to suggest that the sind() routine was noticably
inaccurate (the errors I found were several orders of magnitude higher
than I could account for due to a simple constant multiplier.)
Stepping over the same range in radians was *much* cleaner but errors in
the 1e-15 range in the sine calculation result in detectable non-zero
phases.
If you back transform, ifft() from impulses with 0 phasing, then
the difference against the computed sines will be very small but
measurable.
--
"The first draught serveth for health, the second for pleasure,
the third for shame, the fourth for madness." -- Sir Walter Raleigh
.
- References:
- Matlab FFT Calibration Routines
- From: John Costello
- Matlab FFT Calibration Routines
- Prev by Date: Re: fix digit in number
- Next by Date: Re: fix digit in number
- Previous by thread: Matlab FFT Calibration Routines
- Next by thread: Re: Matlab FFT Calibration Routines
- Index(es):