Re: FAQ available + 2 questions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: FAQ available + 2 questions

Ted.Harding
( Re Message From: Rene van der Heiden )
> I am a new user of octave (version 1.1.1.) and I would like to know if
> there is also a FAQ available of OCTAVE. If yes, could someone send it
> to me?

I don't think there is a FAQ. There is a good PostScript manual in
./octave-1.1.1/doc/octave.ps with the distribution. There is also
a useful refcard.ps

>
> 1. How can I adapt the search path within octave? What is and how can I
> find the default path of Octave?

The octave startup settings are in
/usr/local/bin/octave/1.1.1/m/startup/octaverc
with modifications from ~/.octaverc and from ./.octaverc;
NOTE that octaverc is NOT where the manual says it is (startup is
under m/, not under 1.1.1/). The search path is there set
as a string value for the variable LOADPATH.

> 2. The image processing functions seem not to work ok. E.g. if I do
>
>    x=rand(50,50);
>    image(x)
>
> octave returns:
>
>    warning: save: no such variable `image.6109.img'
>    octtopnm: unable to open input file
>
> Also, xv comes up with the window:
>  
>    File 'image.7496.ppm' contains no data. (Zero length file).
>
> Finally, a file
>
>    -asciii
>          
> appeared in the working directory.
> (I use version 1.1.1.)
>
> Can someone help me with this?

Yes, up to a point. There is a bug (typo) in the file
/usr/local/lib/octave/1.1.1/m/image/saveimage.m:

# The following line is buggy
# eval (['save -asciii ', oct_file, ' map X']);
  eval (['save -ascii ', oct_file, ' map X']);

However, even after correcting that the image stuff didn't work - I
couldn't be bothered to track it any further. By the way, you will
have to do something like "rm ./-asciii" or "rm -- -asciii" to get
rid of the file.

Ted.                                     ([hidden email])

Reply | Threaded
Open this post in threaded view
|

Re: FAQ available + 2 questions

Vinayak Dutt

Ted Harding Writes:
#( Re Message From: Rene van der Heiden )
#> I am a new user of octave (version 1.1.1.) and I would like to know if
#> there is also a FAQ available of OCTAVE. If yes, could someone send it
#> to me?
#
#I don't think there is a FAQ. There is a good PostScript manual in
#./octave-1.1.1/doc/octave.ps with the distribution. There is also
#a useful refcard.ps
#

Actually there is a FAQ postscript file too in the Octave distribution: something like FAQ.ps

#>
#> 1. How can I adapt the search path within octave? What is and how can I
#> find the default path of Octave?
#
#The octave startup settings are in
#/usr/local/bin/octave/1.1.1/m/startup/octaverc
#with modifications from ~/.octaverc and from ./.octaverc;
#NOTE that octaverc is NOT where the manual says it is (startup is
#under m/, not under 1.1.1/). The search path is there set
#as a string value for the variable LOADPATH.
#

The file searching is implemented using the kpathsearch library from TeX
distribution which allows for recursive file searches if the directory
name ends with //. This facility should be tremendously useful as
one does not have to list all the directories in the tree for searches, though one
will have to know that the paths searched within the tree would be in
an alphabetical order.

#> 2. The image processing functions seem not to work ok. E.g. if I do
#>
#>    x=rand(50,50);
#>    image(x)
#>
#> octave returns:
#>
#>    warning: save: no such variable `image.6109.img'
#>    octtopnm: unable to open input file
#>
#> Also, xv comes up with the window:
#>  
#>    File 'image.7496.ppm' contains no data. (Zero length file).
#>
#> Finally, a file
#>
#>    -asciii
#>          
#> appeared in the working directory.
#> (I use version 1.1.1.)
#>
#> Can someone help me with this?
#
#Yes, up to a point. There is a bug (typo) in the file
#/usr/local/lib/octave/1.1.1/m/image/saveimage.m:
#
## The following line is buggy
## eval (['save -asciii ', oct_file, ' map X']);
#  eval (['save -ascii ', oct_file, ' map X']);
#
#However, even after correcting that the image stuff didn't work - I
#couldn't be bothered to track it any further. By the way, you will
#have to do something like "rm ./-asciii" or "rm -- -asciii" to get
#rid of the file.
#

After the above fix, image routines work fine (on SunOS 4.1.3) for me.

--vinayak-
/*
 * vinayak dutt
 * graduate student, ultrasound research
 * mayo graduate school, rochester mn
 *
 * e-mail: [hidden email]
 *         [hidden email]
 *
 */
#include "disclaimer.h"

Reply | Threaded
Open this post in threaded view
|

Re: FAQ available + 2 questions

John Eaton-4
In reply to this post by Ted.Harding
[hidden email] (Ted Harding) wrote:

: I don't think there is a FAQ.

There is one, but it needs some work.  Look for FAQ.{texi,info,dvi,ps}
in the doc directory of the distribution.

: NOTE that octaverc is NOT where the manual says it is (startup is
: under m/, not under 1.1.1/).

Thanks, I've fixed this.

: Yes, up to a point. There is a bug (typo) in the file
:
: [...]
:
: However, even after correcting that the image stuff didn't work

Typing `image' without any arguments at the Octave prompt works for
me.  Can you be more specific about what doesn't work so that I can
fix it?

Thanks,

jwe

Reply | Threaded
Open this post in threaded view
|

Re: FAQ available + 2 questions

Ted.Harding
( Re Message From: John Eaton )

> :
> : However, even after correcting that the image stuff didn't work
>
> Typing `image' without any arguments at the Octave prompt works for
> me.  Can you be more specific about what doesn't work so that I can
> fix it?
>
> Thanks,
>
> jwe
>
Yes, it worked just now for me, too (nice little chap). I think,
when I was bug-hunting in this area some time ago, I got confused
about "loadimage", "saveimage" and the rest (I still am, a bit),
and started pushing the wrong buttons.
Anyway, sorry for the false alarm.

Ted.                                     ([hidden email])