The Mathworks supplied Fortran mxCopyCharacterToPtr and mxCopyPtrToCharacter routines do not work. This submission contains two drop-in replacement routines that do work. They have the same argument signatures as the Mathworks routines. Simply include them with your Fortran source code and they will override the Mathworks library functions.
Also included are two test driver mex functions to demonstrate the use of the routines.
James Tursa (2022). Fortran mex: mxCopyCharacterToPtr and mxCopyPtrToCharacter (https://www.mathworks.com/matlabcentral/fileexchange/20860-fortran-mex-mxcopycharactertoptr-and-mxcopyptrtocharacter), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!