[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
printf and fprintf for "%"
From: |
Jun Ohta |
Subject: |
printf and fprintf for "%" |
Date: |
Sun, 29 May 2005 23:59:47 +0900 |
Hello,
I have been using GNU Octave for 2 years. The octave language is easy to use
for beginers, I know. Two years ago, I had not had any experience of
programming.
Now, I would like to let octave write the character "%" to a text file. I
tried to use "fprintf" for that, but, it was not successful. My use of
"printf" for displaying "%" (see below) has not been successful, too.
I would appreciate it if somebody lets me know how to let octave write the
character "%" to a text file.
Thank you.
Jun Ohta
--------------------------------------------------------------------
>> a = "%"
a = %
>> printf(a)
error: fprintf: invalid format specified
error: evaluating assignment expression near line 35, column 12
error: evaluating if command near line 34, column 3
error: called from `printf' in file
`/usr/local/share/octave/2.1.50/m/io/printf.m'
>>
---------------------------------------------------------------------
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- printf and fprintf for "%",
Jun Ohta <=