Frage

The octave documentation says pdist exists, but I cannot use it in my version installed on ubuntu 12.04.

Octave version:

GNU Octave, version 3.6.2
Copyright (C) 2012 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-pc-linux-gnu"

Do I need to install any package for it?

After the response: I tried to install statistics package:

octave:1> pkg install -forge statistics
error: the following dependencies where unsatisfied:
   statistics needs io >= 1.0.18
War es hilfreich?

Lösung

Yes. You need to install the statistics package. If you look at the list of functions here, you can see the package to which a function belongs to.

EDIT: that error message speaks for itself. The statistics package is dependent on the io package. Just install it, the same way you would install the statistics package.

pkg install -forge io

The problem is that the io package may be dependent on other packages itself, hence why it's recommended to use a package manager to deal with this sort of stuff (Octave's pkg does not yet solve dependencies automatically though some work on that is underway). Since you're using Ubuntu, as long as you didn't built Octave yourself, just install the version from their repositories:

apt-get install octave-statistics

An alternative is to tell pkg to ignore the dependencies and force the install (don't get surprised if parts of the statistics package doesn't work properly later on:

pkg install -forge -nodeps statistics
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top