On Nov 1, 2008, at 1:19 PM, M Katzeimasack wrote: > i do currently have the problem that I want to give a 1d source on a > 2d map a phase distribution that i measured experimentally. For > earlier results i was successful in this by fitting higher order > polynomials to the data, but as the data is fluctuating too fast > now, this is not possible anymore. I thus need somehow to feed in > the approximately 100 data points directly. I tried quite some time > now to find something comparable on the web and to write something > myself but it does just not want to work.
There is lots of documentation on the web on doing I/O in Scheme. The simplest thing is the Scheme "read" command, which reads a Scheme- formatted input file into a variable. For example, suppose you had the a file foo.dat containing the following text, including parentheses: (1 3 12.2 14.5 16 18) In Scheme, you would then write (define port (open-input-file "foo.dat")) (define foo (read port)) (close-input-port port) Your variable foo would then be a list of numbers '(1 3 12.2 14.5 16 18). Steven _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss