Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Mex Array Printing
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Jerome

Posts: 48
Registered: 12/9/11
Mex Array Printing
Posted: Nov 20, 2012 8:12 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am having difficulty with printing an array of values and was wondering if anyone could assist me in what I am doing wrong.

char data_name[40];
mxArray *data_ptr, *time_ptr, *freq_ptr;
double *var, *tvar, *fvar;

...

data_ptr=mxCreateDoubleMatrix(621,1176,mxCOMPLEX);
data_ptr = mexGetVariable("base", data_name);

var=mxGetPr(data_ptr);
mexPrintf("Variable was declared at the command prompt as %f", *var);

Thanks in Advanced




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.