home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WDR Computer Club Digital 1994 October
/
COMPUTER_CLUB_1094.BIN
/
share
/
wnplot
/
data_gen.bas
< prev
next >
Wrap
BASIC Source File
|
1994-08-18
|
541b
|
18 lines
OPEN "C:\WINPLOT\DATA_GEN.CSV" FOR OUTPUT AS #1 ' Open your output file
PRINT #1, "comment, This is a BASIC generated file"
PRINT #1, "signals, sin(x)/x, -dif(sin(x)/x)"
PRINT #1, "samples, x"
PRINT #1, "data"
FOR x = -6.2832 TO 12.566 STEP .4 ' Define X range and resolution
y = SIN(x) / x
dy = y0 - y: y0 = y
i = i + 1
PRINT i; " > "; x
PRINT #1, x; ","; ' output X axis
PRINT #1, y; ",";
PRINT #1, dy ' last signal has no ;",";
NEXT x
CLOSE #1
END