View Single Post
  #4   Spotlight this post!  
Unread 31-01-2004, 09:52
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Re: Lookup table generation tool

Well, you can plot graphs of your data in Perl, you just have to know what you are doing Besides, who doesn't love a command line? Well, to do it in Perl is rather easy, and very customizable ... I'm sure ya'll can figure it out! Here's an example, sans formatting (e.g., float lookup_table[], etc.).

Code:
use warnings;
use strict;

use Math::Trig;

open (OUT, ">your_file.txt") or die "No go!";

for (0..90) {
  print OUT sin($_);  print OUT ", " unless $_ == 89;
}
Edit: and you can use the handy printf function, instead of print, for (as the f probably implies already) formatting. (e.g.,printf ("%.3f", sin (3.14159/4)); )

Last edited by mtrawls : 31-01-2004 at 20:37.