home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of the Best
/
_.img
/
01218
/
data_fft.bas
< prev
next >
Wrap
BASIC Source File
|
1993-08-30
|
552b
|
19 lines
CONST nsamp = 128 ' number of samples
CONST fs = 40 ' sample frequency Hz
CONST w = 6.283185307# ' w=2*pi
DIM n AS INTEGER ' sample #
DIM t AS SINGLE ' time of sample
OPEN "C:\WINPLOT\DATA_FFT.CSV" FOR OUTPUT AS #1 ' Open your output file
FOR n = 1 TO nsamp
t = t + 1 / fs ' t=1/f
LOCATE 1, 1: PRINT n; ' display progress
PRINT #1, t; ","; ' output X axis
PRINT #1, SIN(5 * w * t) + 1 * SIN(8 * w * t) ' output Y axis
NEXT n
CLOSE #1
END