Hellow,I am trying to copy MATLAB strings stored in a matlab structure (example: input.value='title') and copy it to a fortran Character variable using MEX files. When I use this code:
character*32 title mwpointer titleptr count=1 n=32 nelem=1 titlePtr=mxGetFieldByNumber(prhs(1), 1, 1) call mxCopyPtrToCharacter(mxGetData(titleptr),title,n)
It only assigns the first letter 't' to the variable title. Do anyone know how to copy all the characters in the field and assign it to the variable? Thank you so much in advance.
Best Answer