Examples Of Fft Applications - HP F2226A - 48GII Graphic Calculator User Manual

Graphing calculator
Table of Contents

Advertisement

Introduction to Random Vibrations, Spectral & Wavelet Analysis – Third
Edition," Longman Scientific and Technical, New York.
The only requirement for the application of the FFT is that the number n be a
power of 2, i.e., select your data so that it contains 2, 4, 8, 16, 32, 62, etc.,
points.

Examples of FFT applications

FFT applications usually involve data discretized from a time-dependent signal.
The calculator can be fed that data, say from a computer or a data logger, for
processing. Or, you can generate your own data by programming a
function and adding a few random numbers to it.
Example 1 – Define the function f(x) = 2 sin (3x) + 5 cos(5x) + 0.5*RAND,
where RAND is the uniform random number generator provided by the
calculator. Generate 128 data points by using values of x in the interval
(0,12.8). Store those values in an array, and perform a FFT on the array.
First, we define the function f(x) as a RPN program:
<<
x '2*SIN(3*x) + 5*COS(5*x)' EVAL RAND 5 * +
NUM >>
and store this program in variable @@@@f@@@. Next, type the following program to
m
generate 2
data values between a and b. The program will take the values
of m, a, and b:
<<
m a b << '2^m' EVAL
n << '(b-a)/(n+1)' EVAL
Dx << 1 n FOR j
'a+(j-1)*Dx' EVAL f NEXT n
ARRY >> >> >> >>
Store this program under the name GDATA (Generate DATA). Then, run the
program for the values, m = 5, a = 0, b = 100. In RPN mode, use:
5#0#100@GDATA!
The figure below is a box plot of the data produced. To obtain the graph,
first copy the array just created, then transform it into a column vector by
1 +
using: OBJ
ARRY (Functions OBJ
and
ARRY are available
Page 16-50

Advertisement

Table of Contents
loading

This manual is also suitable for:

48gii

Table of Contents