Join fileparts
Version 1.0.0 (1.12 KB) by
Valerio Rubino
Joins into char vectors file parts, using / as delimiter.
When using fullfile() on Windows, it outputs the path of a file with the backslash (\) as delimiter. If the output is then passed as a format specifier to a function like sprintf (or compose), it runs into error, e.g. sprintf(fullfile('folder', '%d'), nr), because it interprets the blackslash as an escape character.
This function deals with the issue by adjoining file parts using the forward slash (/) as delimiter.
Cite As
Valerio Rubino (2026). Join fileparts (https://www.mathworks.com/matlabcentral/fileexchange/90476-join-fileparts), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
