Page 1 of 1
how to export an array
Posted: Thu Jun 23, 2005 4:17 pm
by xyang
how to export an array to a file, so that easy to read?
Thanks
Posted: Fri Jun 24, 2005 1:18 pm
by ted
If by "array" you mean "Vector" then use the Vector class's
printf method. Documentation of the Vector and File classes
is on your PC already if you are using MSWin. Otherwise, see
http://www.neuron.yale.edu/neuron/stati ... tml#printf
and
http://www.neuron.yale.edu/neuron/stati ... /file.html
If you mean "array of doubles" then just open a file and use a
"for loop" to print them one by one to the file. See
http://www.neuron.yale.edu/neuron/stati ... tf.html#IO