title: Install Octave packages on ubuntu 16
body: <p>I tried several commands to install the package <code>optim</code> into my Octave in <code>Ubuntu 16.10</code> to use the function <code>xcorr</code>, but I miserably failed.</p>
  
  <p>Some of these commands were:</p>
  
  <pre><code>- sudo apt-get install octave-optim
  - sudo apt-get install liboctave-dev
  - sudo apt-get install octave-signal
  - sudo apt-get install octave-pkg-dev
  </code></pre>
  
  <p>Can somebody explain me or does somebody know how to install the packages in Ubuntu 16?
  After running the above-mentioned commands, I restarted Octave but the command <code>xcorr()</code> was still returning the error:</p>
  
  <blockquote>
    <p>warning: the 'xcorr' function belongs to the signal package from
    Octave Forge which you have installed but not loaded.  To load the
    package, run 'pkg load signal' from the Octave prompt.</p>
  </blockquote>
  
  <p>Unfortunately, 'pkg' returns:</p>
  
  <blockquote>
    <p>No command 'pkg' found, did you mean:  Command 'pig' from package
    'bsdgames' (universe)  Command 'peg' from package 'peg' (universe) 
    Command 'pki' from package 'pki-tools' (universe)  Command 'pki' from
    package 'strongswan-starter' (main)  Command 'dpkg' from package
    'dpkg' (main)  Command 'pg' from package 'util-linux' (main)  Command
    'ekg' from package 'ekg' (universe)  Command 'ekg' from package
    'ekg-gtk' (universe) pkg: command not found</p>
  </blockquote>