12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

304 <strong>GNU</strong> <strong>Octave</strong>pause (seconds)Built-in FunctionSuspend the execution of the program. If invoked without any arguments, <strong>Octave</strong>waits until you type a character. With a numeric argument, it pauses for the givennumber of seconds. For example, the following statement prints a message and thenwaits 5 seconds before clearing the screen.fprintf (stderr, "wait please...");pause (5);clc;sleep (seconds)Built-in FunctionSuspend the execution of the program for the given number of seconds.usleep (microseconds)Built-in FunctionSuspend the execution of the program for the given number of microseconds. Onsystems where it is not possible to sleep for periods of time less than one second,usleep will pause the execution for round (microseconds / 1e6) seconds.34.2 Filesystem Utilities<strong>Octave</strong> includes the following functions for renaming and deleting files, creating, deleting,and reading directories, and for getting information about the status of files.[err, msg] = rename (old, new)Change the name of file old to new.Built-in FunctionIf successful, err is 0 and msg is an empty string. Otherwise, err is nonzero and msgcontains a system-dependent error message.[err, msg] = link (old, new)Create a new link (also known as a hard link) to an existing file.Built-in FunctionIf successful, err is 0 and msg is an empty string. Otherwise, err is nonzero and msgcontains a system-dependent error message.[err, msg] = symlink (old, new)Create a symbolic link new which contains the string old.Built-in FunctionIf successful, err is 0 and msg is an empty string. Otherwise, err is nonzero and msgcontains a system-dependent error message.[result, err, msg] = readlink (symlink)Read the value of the symbolic link symlink.Built-in FunctionIf successful, result contains the contents of the symbolic link symlink, err is 0 and msgis an empty string. Otherwise, err is nonzero and msg contains a system-dependenterror message.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!