home *** CD-ROM | disk | FTP | other *** search
/ The Best of the Best / _.img / 01218 / data_gen.bas < prev    next >
BASIC Source File  |  1993-08-30  |  520b  |  17 lines

  1. OPEN "C:\WINPLOT\DATA_GEN.CSV" FOR OUTPUT AS #1  ' Open your output file
  2. PRINT #1, "comment, This is a BASIC generated file"
  3. PRINT #1, "signals, x, sin(x)/x, -dif(sin(x)/x)"
  4. PRINT #1, "data"
  5. FOR x = -6.2832 TO 12.566 STEP .4                ' Define X range and resolution
  6.   y = SIN(x) / x
  7.   dy = y0 - y: y0 = y
  8.   i = i + 1
  9.   PRINT i; " > "; x
  10.   PRINT #1, x; ",";                          ' output X axis
  11.   PRINT #1, y; ",";
  12.   PRINT #1, dy                  ' last signal has no ;",";
  13. NEXT x
  14. CLOSE #1
  15. END
  16.  
  17.