# HP Forums

Full Version: Spectrum Analysis (Fourier)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
compile compile compile compile!!!!
The plot you see after a successful run is Magnitude Plot;
For Phase plot; plot D3;

I
Spect()
Under this notation in F0 with Xrange of a period or integer multiple of T.
eg. F0 for sin(X) in Xrng 0 to 2*pi or -pi to +pi
eg. 1*Heaviside(X)+-1*Heaviside(X-1) Xrng 0 to 2; this defines PiecewiseFunction of X=1 between 0 and 1; X=0 elsewhere repeating at a T=2;

II
spect(lowerLimit, Period)
Under this notation plot in F0; don't care about Xrng but specify the range in function call.
eg. F0 for sin(X); call function spect(0,2*pi) OR spect(-pi,2*pi); bcos sinX T=2pi always.
the ~Fourier plot can be found under Function app. Press plot under Function App.
eg. 1*Heaviside(X)+-1*Heaviside(X-1); PiecewiseFunction of X=1 between 0 and 1; X=0 elsewhere;
function call spect(0,2) for T=2; check plot on Function App;

[attachment=6217] [attachment=6219]

complex function:
COS(X)+sin(2X)+COS(3X+.11)+2 at F0
fo(rads/s) for this function is gcd(1,2,3) in exact CAS; hence T=2*pi/gcd(1,2,3)
under I notation
plot F0 for Xrng 0 to T or 0 to integer*T; then Spect();

under II
plot F0 then spect(0,T)
Great, thank you, toshk
Best,

Aries
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :