Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#151 double2mxArray and double_complex2mxArray not implemented

release_3.10.x
closed
3
2012-09-15
2007-04-19
Danilo Zanatta
No

Hi,

I found that both functions double2mxArray and double_complex2mxArray are definied in itmex.h, but they are not implemented.

I've implemented double2mxArray as follows...

void itpp::double2mxArray(const double &in, mxArray out)
{
double
temp = (double *) mxGetPr(out);
if (temp==0) mexErrMsgTxt("vec2mxArray: Pointer to data is NULL");

*temp= (double) in;

}

Best Regards,
daniloz

Discussion

  • Logged In: YES
    user_id=1004597
    Originator: NO

    Hi Danilo,

    What about the second implementation - double_complex2mxArray()? Could you provide a patch for both missing functions? Thanks!

    BR,
    /ediap

     
  • Danilo Zanatta
    Danilo Zanatta
    2007-04-20

    Patch of itmex.h with the implementation of both functions

     
    Attachments
  • Danilo Zanatta
    Danilo Zanatta
    2007-04-20

    Logged In: YES
    user_id=898071
    Originator: YES

    File Added: itmex.daniloz.patch

     
  • Logged In: YES
    user_id=1004597
    Originator: NO

    This bug have been fixed in the SVN sources (on both the trunk and itpp-3-10 branch). Once again - thanks for providing the patch!