image thumbnail

Slashes Fix

version 1.0.0 (1.12 KB) by Valerio Rubino
Replace \ with /. Helpful to use sprintf, compose etc.

0 Downloads

Updated 14 Apr 2021

View License

Some functions (e.g. compose, sprintf, fprintf) use the backward slash ('\') as escape character; therefore, any format specifier containing a backward slash result into error (Warning: Escaped character '\%' is not valid.). This function simply change any backward to forward slash, coping with the issue.
e.g. sprintf(slashes_fix(formatSpec),txt)

Cite As

Valerio Rubino (2021). Slashes Fix (https://www.mathworks.com/matlabcentral/fileexchange/90471-slashes-fix), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!