[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with single quotes
From: |
John W. Eaton |
Subject: |
Re: Problem with single quotes |
Date: |
Thu, 02 Oct 2008 11:30:35 -0400 |
On 2-Oct-2008, Andreas Yankopolus wrote:
| > I doubt that'll work in Matlab either:
| >
| > 1) Matlab doesn't have the printf function -- you have to use fprintf
|
| I've changed all my printf(?) statements to fprintf (1, ?)
You should not need to use fprintf (1, fmt, args, ...). You can just
write fprintf (fmt, args, ...). This works because if the first
argument to fprintf is a character string, it is used as the format
and the default output stream is the standard output (stdout, or
stream number 1).
| > 2) The escape code for ' inside a single quoted string is ''.
| >
| > So, the following should work:
| > fprintf ('''')
|
| I did not know that. That statement prints a double quote in Octave.
No, it should print a single ' character, same as Matlab.
| I'll give it a shot in Matlab and see what happens.
jwe
- Problem with single quotes, Andreas Yankopolus, 2008/10/02
- Re: Problem with single quotes, Søren Hauberg, 2008/10/02
- Re: Problem with single quotes, Andreas Yankopolus, 2008/10/02
- Re: Problem with single quotes, John W. Eaton, 2008/10/02
- Re: Problem with single quotes, Dmitri A. Sergatskov, 2008/10/02
- Re: Problem with single quotes, Francesco Potorti`, 2008/10/02
- Re: Problem with single quotes, Sergei Steshenko, 2008/10/02
Re: Problem with single quotes, Jaroslav Hajek, 2008/10/02