help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plotting time series in Octave


From: indium
Subject: Re: plotting time series in Octave
Date: Thu, 29 Mar 2012 07:51:47 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Mar 28, 2012 at 08:36:59PM -0400, financial engineer wrote:
> 
> > 
> > Hi Bobby,
> > 
> > you can do without the -forge option: this just gets the package 
> > automatically from the internet. Instead, just get it from 
> > http://octave.sf.net (the financial package) and start octave from the 
> > command line from the directory where you have saved the downloaded 
> > package. From the 'octave>' prompt you can do:
> > pkg install "./financial-0.3.2.tar.gz"
> > 
> > hope this works.
> > 
> > Otherwise to install the 3.6 version of octave, just download the .tar.gz 
> > file, uncompress it and install it in your home directory.
> > 
> > mkdir ~/src
> > cd ~/src
> > mv ~/Downloads/octave.XXXXXXX.tar.gz .
> > tar xvzf octave.XXXXXX.tar.gz
> > ./configure --prefix=$HOME
> > (if it complains about (critical) missing libraries, use synaptic package 
> > manager to search for the libraries/header files and install them or 
> > google).
> > make 
> > make install
> > 
> > BE AWARE: this installation can easily take an hour to finish...
> > 
> > This will install your own octave executable, beside the standard ubuntu 
> > version. If you want to --always-use-- your own version, add this to your 
> > $HOME/.bash_profile or $HOME/.bashrc:
> > 
> > export PATH=$HOME/bin:$PATH
> > 
> > HTH, indium
> > 
> 
> thanks Indium,
> I tried installing the financial package, and it complained about an older 
> version of time on my machine. So, I tried to install that, but....
> 
> pkg install "/financial-0.3.2.tar.gz"
> error: the following dependencies where unsatisfied:
>    financial needs time >= 1.0.5
> octave-3.2.4:2> pkg install "/time-1.0.9.tar.gz"
> couldn't create installation directory 
> /usr/share/octave/packages/3.2/time-1.0.9 : Permission denied
> error: called from `pkg>copy_files' in file 
> /usr/share/octave/3.2.4/m/pkg/pkg.m near line 1431, column 7
> error: called from:
> error:   /usr/share/octave/3.2.4/m/pkg/pkg.m at line 756, column 5
> error:   /usr/share/octave/3.2.4/m/pkg/pkg.m at line 287, column 7
> octave-3.2.4:2> sudo pkg install "/time-1.0.9.tar.gz"
> error: `sudo' undefined near line 2 column 1
> 
> It seems like I cannot use sudo in octave....I typically do sudo -i on my 
> machine to go in as root if it complains about sudo, but none of that works 
> here. any thoughts on how I go about it...I am still working on the ubuntu 
> version....Bobby

Hi Bobby,

the sudo command is indeed a linux/ubuntu/debian facility to get root 
priviledges on the file and operating system. It has nothing to do with octave. 
When you start octave (being you and not root or sudo), octave get your rights 
and not those of root. I suppose you could start octave as 'sudo octave' or 
first login as root via 'su' and then start octave. This would allow you to 
write to those directories as /usr/share and so.

BUT: I suppose you're not using your ubuntu together with other people, are 
you? If you're the only user of your computer, then you might as well just 
install the packages (like the financial) also in your $HOME directory. To do 
this, add the following to your $HOME/.octaverc file (or create that is if it 
doesn't exist):

pkg prefix '~/share/octave' ;

After restarting octave, if you run pkg install "./financial-0.3.2.tar.gz", it 
will install the package in $HOME/share/octave, so it doesn't need access to 
/usr/share or any other root directory.

I saw that you wrote "/financial-0.3.2.tar.gz" instead of 
"./financial-0.3.2.tar.gz": this means that octave will search in the root 
directory "/" instead of the 'current directory' "./".

I also store all my own octave functions that I re-use in one directory 
$HOME/share/octave/site. If you do this and add 

addpath('~/share/octave/site')

to your $HOME/.octaverc, then octave will search for those functions in that 
directory and you have a central place to store/maintain them. Try 'doc 
addpath', 'doc path', for a description.


A third option regarding the packages: you can install the octave packages that 
are standard in the ubuntu repository/software center. This might not be the 
most current version, but it's compatible with the octave you're running.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]