You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Have you ever needed to trim an existing file? MATLAB cannot do this natively without creating a new file, copying the bytes to be kept, and then deleting the original. This function uses a Perl script, which MATLAB can invoke from any* platform without compliation.
*I have not tested MATLAB Mobile.
Cite As
Dan Dolan (2026). Truncate file (https://au.mathworks.com/matlabcentral/fileexchange/182650-truncate-file), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: FileResize
General Information
- Version 1.0.0 (1.91 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |
