Search code examples
urldownloadoctavewget

How can I run wget through Octave


I've seen examples of wget being ran through matlab, and I wondered if there's any way to do the same thing through Octave. I already tried the functions in Octave but they're not customizable enough that they work for the downloads I need. Thanks in advance!

Edit: I didn't know about the system() function, should work with that. Thanks Vicky :)


Solution

  • As another commenter said, you can use system() to run arbitrary shell commands.

    However, if your intention is simply to add a 'downloading' function inside an octave script, then you can use octave's urlread command for that instead. This reads a website, and returns its source code as a string.

    This might be particularly preferred if the only reason you're downloading a file through octave in the first place is to then open it from within octave and read its contents.

    There is also webread. Have a look at their documentation to compare the two.