Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 469

octave-doc-3.6.4-3.mga4.noarch.rpm

<html lang="en">
<head>
<title>Startup Files - GNU Octave</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Octave">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-Octave-from-the-Command-Line.html#Invoking-Octave-from-the-Command-Line" title="Invoking Octave from the Command Line">
<link rel="prev" href="Command-Line-Options.html#Command-Line-Options" title="Command Line Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Startup-Files"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Command-Line-Options.html#Command-Line-Options">Command Line Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-Octave-from-the-Command-Line.html#Invoking-Octave-from-the-Command-Line">Invoking Octave from the Command Line</a>
<hr>
</div>

<h4 class="subsection">2.1.2 Startup Files</h4>

<p><a name="index-initialization-70"></a><a name="index-startup-71"></a>
When Octave starts, it looks for commands to execute from the files in
the following list.  These files may contain any valid Octave commands,
including function definitions.

   <p><a name="index-startup-files-72"></a>
     <dl>
<dt><var>octave-home</var><code>/share/octave/site/m/startup/octaverc</code><dd><a name="index-site-startup-file-73"></a>where <var>octave-home</var> is the directory in which Octave is installed
(the default is <samp><span class="file">/usr/local</span></samp>). 
This file is provided so that changes to the default Octave environment
can be made globally for all users at your site for all versions of Octave
you have installed.  Care should be taken when making changes to this file
since all users of Octave at your site will be affected.  The default file
may be overridden by the environment variable <samp><span class="env">OCTAVE_SITE_INITFILE</span></samp><!-- /@w -->.

     <br><dt><var>octave-home</var><code>/share/octave/</code><var>version</var><code>/m/startup/octaverc</code><dd><a name="index-version-startup-file-74"></a>where <var>octave-home</var> is the directory in which Octave is
installed (the default is <samp><span class="file">/usr/local</span></samp>), and <var>version</var>
is the version number of Octave.  This file is provided so that changes
to the default Octave environment can be made globally for all users of
a particular version of Octave.  Care should be taken when making
changes to this file since all users of Octave at your site will be
affected.  The default file may be overridden by the environment variable
<samp><span class="env">OCTAVE_VERSION_INITFILE</span></samp><!-- /@w -->.

     <br><dt><code>~/.octaverc</code><dd><a name="index-personal-startup-file-75"></a><a name="index-g_t_0040code_007b_007e_002f_002eoctaverc_007d-76"></a>This file is used to make personal changes to the default
Octave environment.

     <br><dt><code>.octaverc</code><dd><a name="index-project-startup-file-77"></a><a name="index-g_t_0040code_007b_002eoctaverc_007d-78"></a>This file can be used to make changes to the default Octave environment
for a particular project.  Octave searches for this file in the current
directory after it reads <samp><span class="file">~/.octaverc</span></samp>.  Any use of the <code>cd</code>
command in the <samp><span class="file">~/.octaverc</span></samp> file will affect the directory where
Octave searches for <samp><span class="file">.octaverc</span></samp>.

     <p>If you start Octave in your home directory, commands from the file
<samp><span class="file">~/.octaverc</span></samp> will only be executed once. 
</dl>

   <p>A message will be displayed as each of the startup files is read if you
invoke Octave with the <samp><span class="option">--verbose</span></samp> option but without the
<samp><span class="option">--silent</span></samp> option.

   <p>The <code>dump_prefs</code> function is useful for determining what customizations
to Octave are possible and which are in effect.

<!-- dump_prefs scripts/miscellaneous/dump_prefs.m -->
   <p><a name="doc_002ddump_005fprefs"></a>

<div class="defun">
&mdash; Function File:  <b>dump_prefs</b> ()<var><a name="index-dump_005fprefs-79"></a></var><br>
&mdash; Function File:  <b>dump_prefs</b> (<var>fid</var>)<var><a name="index-dump_005fprefs-80"></a></var><br>
<blockquote><p>Dump all of the current user preference variables in a format that can be
parsed by Octave later.  <var>fid</var> is a file descriptor as returned by
<code>fopen</code>.  If <var>file</var> is omitted, the listing is printed to stdout. 
</p></blockquote></div>

   </body></html>