What happens to my string data?
- From: Tim <tim.earthrowl@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Sep 2005 10:28:09 -0400
Mex problem for you....
Trying to convert a perfectly well behaved C struct of string
variables to plhs[0] I added this code to check what was about to be
returned return:
for(int j=0;j<NUM_FIELDS;j++){
mexPrintf("%s:
%s\n",mxGetFieldNameByNumber(plhs[0],j),mxArrayToString(mxGetFieldByNu
mber(plhs[0],0,j)));
}
some of the data (mostly numerical strings) were good, some where
bad. How did that happen?
Note: I populated plhs[0] with something similar to this:
mxSetField(plhs[0],0,"M_Field_Name",mxCreateString(C_Struct->C_Fiel
d_Name));
Or am I going dotty in my old age?
Thanks if you can see what's up
Tim
.
- Prev by Date: Matlab Axis origin fix problem
- Next by Date: Re: 2 imagesc plots question
- Previous by thread: Matlab Axis origin fix problem
- Next by thread: Weird memory-related crash
- Index(es):
Relevant Pages
|