help-octave
[Top][All Lists]
Advanced

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

Re: problem with greek caracters while ploting


From: Mike Miller
Subject: Re: problem with greek caracters while ploting
Date: Wed, 8 Apr 2015 10:24:49 -0400

On Wed, Apr 8, 2015 at 14:32:27 +0200, Mehdi Daakir wrote:
> I'm facing a little problem using octave.
> I'm ploting some figure where I would like to print the greek caracter
> sigma.
> So my title look like : str=sprintf('\sigma = %.3f',value);title(str);
> The problem is I'm getting sigma when I'm printing my figure.
> Octave complains and the warning says :
> "
> warning: unrecognized escape sequence '\s' -- converting to 's'
> "

The printf family of functions interpret backslash as an escape
character. Valid escape sequences include '\n', '\t', etc.

To insert a literal backslash, escape it with another backslash:

  str=sprintf('\\sigma = %.3f',value);

HTH,

-- 
mike



reply via email to

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