[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems using the image function
From: |
Ted Harding |
Subject: |
Re: Problems using the image function |
Date: |
Wed, 26 Jul 1995 09:28:41 +0200 (BST) |
( Re Message From: Michael Martins )
> Ich have problems to use the image and imagesave function. The command
> sequence:
>
> octave:1> a = [1 2; 3 4];
> octave:2> image(a);
>
> gives the following error message:
>
> warning: save: no such variable `image.1307.img'
> octtopnm: unable to open input file
This is a minor bug in "saveimage.m". Here is the answer to a similar
recent query:
I think you have fallen foul of a typo in the file
/usr/local/lib/octave/1.1.1/m/image/saveimage.m
as follows
# Save image in octave image file format
# The following line is buggy
# eval (['save -asciii ', oct_file, ' map X']);
eval (['save -ascii ', oct_file, ' map X']);
where oct_file is a string which is intended to be a filename of the form
"image.xxxx.img", where "xxxx" is four random digits. Because the flag
"-ascii" is mis-spelt, the save command executed is
save -asciii image.xxxx.img map X
which tries to save variables 'image.xxxx.img', 'map' and 'X' to the file
'-asciii'. Hence the result. If you make the correction given above, it
should work. (By the way, delete the file '-asciii' in your directory.)
Ted. (address@hidden)