saving a vector into a file

The basics of how to develop, test, and use models.
Post Reply
ecchiang
Posts: 7
Joined: Mon Jul 24, 2006 12:53 pm
Location: Case Western Reserve University, Cleveland, OH

saving a vector into a file

Post by ecchiang »

How do I write a vector into a text file that just lists all the numbers stored in the vector? I ultimatley want to import the file into Excel or origin to do some data anysis. I've tried vwrite and fwrite but they don't seem to work for me.

Thanks,
Elisa
ted
Site Admin
Posts: 6395
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

The Vector class's vwrite and fwrite produce binary files. Excel can't read those. You need
to generate a plain text file. Use the Vector class's printf method. Read about it here
http://www.neuron.yale.edu/neuron/stati ... tml#printf
and read about the File class here
http://www.neuron.yale.edu/neuron/stati ... .html#File
Post Reply