Use
#include "matrix.h" #include "mat.h" mp = mxCreateString(str); matPutVariable(mfp, name, mp); mxDestroyArray(mp);
instead of
matPutString(mfp, name, str);
See Also
matPutVariable
© 1994-2005 The MathWorks, Inc.