September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,14 +1,14 @@
|
|||
func writedat(filename, x, y, x_precision=3, y_precision=5) {
|
||||
var fh = File.new(filename).open_w;
|
||||
|
||||
MultiArray.new(x, y).each { |x, y|
|
||||
fh.printf("%.*g\t%.*g\n", x_precision, x, y_precision, y);
|
||||
var fh = File(filename).open_w
|
||||
|
||||
for a,b in (x ~Z y) {
|
||||
fh.printf("%.*g\t%.*g\n", x_precision, a, y_precision, b)
|
||||
}
|
||||
|
||||
fh.close;
|
||||
|
||||
fh.close
|
||||
}
|
||||
|
||||
var x = [1, 2, 3, 1e11];
|
||||
var y = x»sqrt»();
|
||||
|
||||
writedat('sqrt.dat', x, y);
|
||||
|
||||
var x = [1, 2, 3, 1e11]
|
||||
var y = x.map{.sqrt}
|
||||
|
||||
writedat('sqrt.dat', x, y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue