The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: What's the difference of \\ and \ when used in sprintf?
Replies: 2   Last Post: Jun 30, 2013 11:36 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 2
Registered: 6/30/13
What's the difference of \\ and \ when used in sprintf?
Posted: Jun 30, 2013 9:03 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I tried to generate a file name by sprintf as:

filename = sprintf('D:\...\%03d', 1);

and it doesn't work.
Then I changed it into:

filename = sprintf('D:\\...\\%03d',1);

and it works.
So what's happening here?
Thanks guys


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.