home *** CD-ROM | disk | FTP | other *** search
/ WDR Computer Club Digital 1994 October / COMPUTER_CLUB_1094.BIN / share / wnplot / data_gen.bas < prev    next >
BASIC Source File  |  1994-08-18  |  541b  |  18 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, sin(x)/x, -dif(sin(x)/x)"
  4. PRINT #1, "samples, x"
  5. PRINT #1, "data"
  6. FOR x = -6.2832 TO 12.566 STEP .4                ' Define X range and resolution
  7.   y = SIN(x) / x
  8.   dy = y0 - y: y0 = y
  9.   i = i + 1
  10.   PRINT i; " > "; x
  11.   PRINT #1, x; ",";                          ' output X axis
  12.   PRINT #1, y; ",";
  13.   PRINT #1, dy                  ' last signal has no ;",";
  14. NEXT x
  15. CLOSE #1
  16. END
  17.  
  18.