importing file?

View: New views
3 Messages — Rating Filter:   Alert me  

importing file?

by Emily Moberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi!

I'm a really new user to Octave and was trying to  import a text file that contains numbers in a vertical column. I saw on an archived post that data = load("filename.txt") should work, but Octave spits out the error message that it can't find the file; do I need to put it somewhere special? I'm sorry if this is a stupid question! Thanks!

Emoeberg


Now you can invite friends from Facebook and other groups to join you on Windows Live™ Messenger. Add them now!
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Parent Message unknown Re: importing file?

by Jordi Gutiérrez Hermoso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 04/06/2008, Emily Moberg <emilym122@...> wrote:
 > load("filename.txt") should work, but Octave spits out the error message
 > that it can't find the file; do I need to put it somewhere special?

Put it in the current directory. If you want to know what Octave
 thinks the current directory is, type "pwd" at an Octave prompt.

 - Jordi G. H.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: importing file?

by gOS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The file needs to be located in the same directory you are working in with the octave prompt. commands pwd/ls/dir depending on your OS should tell you what directory you are working in.

Also, which 'filename' should help locate where your file is now, if Octave can see it.

You may also want to look up csvread & dlmread.

Emily Moberg wrote:
Hi!

I'm a really new user to Octave and was trying to  import a text file that contains numbers in a vertical column. I saw on an archived post that data = load("filename.txt") should work, but Octave spits out the error message that it can't find the file; do I need to put it somewhere special? I'm sorry if this is a stupid question! Thanks!

Emoeberg

_________________________________________________________________
Now you can invite friends from Facebook and other groups to join you on Windows Live™ Messenger. Add now.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now
_______________________________________________
Help-octave mailing list
Help-octave@octave.org
https://www.cae.wisc.edu/mailman/listinfo/help-octave