WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
1981 Views
|
2 Replies
|
1 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Import and Export
Wolfram Language
How to import / read a txt file of numbers into a vector
John Mycroft
John Mycroft
Posted
11 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
Reply
|
Flag
2 Replies
Sort By:
Replies
Likes
Recent
1
David Reiss
David Reiss, Scientific Arts
Posted
11 years ago
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
|
Flag
0
John Mycroft
John Mycroft
Posted
11 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
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback