The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Spectrum Analysis (Fourier)
08-17-2015, 04:51 PM (This post was last modified: 03-09-2018 09:03 PM by toshk.)
Post: #1
Spectrum Analysis (Fourier)
It works by plotting a function at F0.
Spect() to plot the spectra.
eg. SIN(X) at F0 plotted within a range of period T=2*pi.

PHP Code:
#pragma mode( separator(.,;) integer(h32) )
export Spect()
BEGIN
local dmin
,dmax,dx,n;
local L0,L1,L4,L5;
L0:={}; L1:={}; L4:={}; L5:={};
dmin:=Function.Xmin;
dmax:=Function.Xmax;
dx:=(dmax-dmin)/1024;
L0:=makelist(X,X,dmin,dmax,dx);
L1:=F0(L0);
L4:=mat2list(fft(L1));
FOR 
n FROM 1 TO size(L4STEP 1 DO
L4[n]:=approx(ABS(L4[n])*(2/1024));
END;
L5:=makelist(X,X,0,(1/dx)/2,(1/dx)/1025);
L0:={}; L1:={};
startapp("Statistics 1Var");
FOR 
n FROM 1 TO size(L5STEP 1 DO
L1[n]:=L4[n]; end;
D1:=L5D2:=L1;
Statistics_1Var.H1:={'D2','D1','5'};
Statistics_1Var.CHECK(1);
startview(1,1);
END


Attached File(s) Thumbnail(s)
               
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Spectrum Analysis (Fourier) - toshk - 08-17-2015 04:51 PM
RE: Spectrum Analysis (Fourier) - toshk - 08-15-2018, 07:35 PM



User(s) browsing this thread: 2 Guest(s)