how to export an array

Anything that doesn't fit elsewhere.
Post Reply
xyang

how to export an array

Post by xyang »

how to export an array to a file, so that easy to read?
Thanks
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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
Post Reply