Be the first to rate this file! 1 Download (last 30 days) File Size: 9.5 KB File ID: #20860
image thumbnail

Fortran mex: mxCopyCharacterToPtr and mxCopyPtrToCharacter

by James Tursa

 

26 Jul 2008 (Updated 01 Aug 2008)

Drop in replacements for the Mathworks supplied functions of the same names that do not work.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Any supported Fortran compiler. Be sure to use version 2 files for Compaq Visual Fortran.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
31 Jul 2008 James Tursa

Just got a report that these may not work in Compaq Visual Fortran ... I am looking into it. My original tests were done using Intel Fortran.

Please login to add a comment or rating.
Updates
01 Aug 2008

Confirmed that Compaq Visual Fortran does not support the %REF construct properly in the original files. So I am including versions that do not use %REF. These should work with Compaq Visual Fortran.

Tag Activity for this File
Tag Applied By Date/Time
external interface James Tursa 22 Oct 2008 10:11:56
mxcopycharactertoptr James Tursa 22 Oct 2008 10:11:56
mxcopyptrtocharacter James Tursa 22 Oct 2008 10:11:56
mex James Tursa 22 Oct 2008 10:11:56
engine James Tursa 22 Oct 2008 10:11:56

Contact us at files@mathworks.com