Message Boards Message Boards

0
|
1680 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

How to import / read a txt file of numbers into a vector

Posted 10 years ago
I have a large number of integers in a TXT file, each number on a separate line with no leading or trailing spaces.  How do I get this intoa vector, please?  I have tried Help and a variety of commands but none of them give me a vector or any helpful error messages.  Needless to say, it's the first time I've tried to do this.
POSTED BY: John Mycroft
2 Replies
Posted 10 years ago
Thanks!  That worked perfectly - goodness knows why it didn't originally.  Now I have a new problem but I guess I should start a new thread.
POSTED BY: John Mycroft
What have you tried?  Could you post a small version of your TXT file here?  Hard to help with no detailed information. 

But, you should try something like
Import["your path here","Table"]
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract