octave-maintainers
[Top][All Lists]
Advanced

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

sprintf help


From: rik
Subject: sprintf help
Date: Thu, 14 May 2015 21:53:56 -0700

Could someone run the following code under Matlab?

-- Begin Code --
x = sprintf ('%s%s%s\n', [65 66 67])
size (x)

y = sprintf ('%s %s%s\n', [65 66 67])
size (y)
-- End Code --

Octave returns 1x3, i.e., missing the newline character.  Unless there is
something after the first '%s' in the format specification such as a space.

--Rik




reply via email to

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