help-octave
[Top][All Lists]
Advanced

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

RE: About "warning: implicit conversion from matrix to string"


From: Richardson, Anthony
Subject: RE: About "warning: implicit conversion from matrix to string"
Date: Thu, 20 May 2010 08:33:59 -0500


> From: Dr.cryo [mailto:address@hidden
> Sent: Thursday, May 20, 2010 7:11 AM
> To: address@hidden
> Cc: address@hidden
> Subject: RE: About "warning: implicit conversion from matrix to
string"
> > Subject: Re: About "warning: implicit conversion from matrix to
> string"
> > From: address@hidden
> > Date: Thu, 20 May 2010 07:48:15 -0400
> > CC: address@hidden
> > To: address@hidden
> >
> > On May 20, 2010, at 7:30 AM, Dr.cryo wrote:
> > >
> > > > Subject: Re: About "warning: implicit conversion from matrix to
> string"
> > > > From: address@hidden
> > > > Date: Thu, 20 May 2010 07:23:23 -0400
> > > > CC: address@hidden
> > > > To: address@hidden
> > > >
> > > >
> > > > On May 20, 2010, at 1:48 AM, cookyzhao wrote:
> > > >
> > > > >
> > > > > Each time, when i try to export an emf formatted picture,
there
> > > > > is a warning message "warning: implicit conversion from matrix
> > > > > to string" for octave 3.2.4.
> > > > >
> > > > &g! t; I really wonder why i get this message, and what should i
> > > > do to correctly
> > > > > export such emf files?
> > > > >
> > > > >
> > > > > for example:
> > > > >
> > > > > print -demf "-S640,480" test.emf
> > > >
> > > > When I print (using your example) I don't get the error. I
> suspect the error is from gnuplot.
> > > >
> > > > What is the version of gnuplot you hav installed?
> > > >
> > > > Ben
> > > >
> > > >
> > >
> > > in the fold of octave, i find my gnuplot, version 4.4, and i have
> also installed gnuplot 4.5 seperately.
> > > i think octave will call version 4.4
> >
> > You can determine which one by typing ...
> >
> > __gnuplot_version__
> >
> > Another possibility is that the error is related so a specific plot
> object. Do you get the error for ...
> &! gt;
> > clf
> > plolt (0:10)
> > print -demf "-S640,480" test.emf
> >
> > If not, can you provide a simple example which does?
> >
> > I don't presently have version 4.4 or 4.5 installed, but have been
> meaning to do so. I'll take a look to see if that is straight forward.
> >
> > Ben
> >
> > p.s. Please "reply-all" so that others can benefit, and reply at the
> bottom so that those arriving late can follow along. Thanks.
> 
> 
> i copy gnuplot 4.5.0 into the octave fold, and i find that as is also
> the fact.

I get the same warning with Octave version 3.2.4 for Windows.  It comes
from the
following line in print.m:

 have_ghostscript = (exist (ghostscript_binary, "file") == 2);

when ghostscript_binary is an empty matrix.  ghostscript is used to
produce
an output file only for certain output formats.  gnuplot is used for
most,
including the emf output format that you want, so the warning is
harmless.  
You can eliminate it though by setting the GSC environment variable to a
dummy value:

setenv("GSC","GSC");

in an octave startup file (or at the octave command prompt before using
print).
Better yet would be to set GSC to the actual ghostscript executable
filename.  

It appears that if ghostscript is installed and is in a directory in
your PATH, 
that this warning should not appear even if GSC is not set.  I expect
that Ben
has ghostscript installed and that is why he is not seeing the message.

Alternatively, replace the above line in print.m with:

    if(isempty(ghostscript_binary))
      have_ghostscript = 0;
    else
      have_ghostscript = (exist (ghostscript_binary, "file") == 2);
    endif

to make the warning go away.

Tony



reply via email to

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