From: Nilesh on 27 Jul 2010 08:25 hello , i am using mxGetPr for Double type.but what am i supposed to use for int data type. for example mxArray * mx = mxCreateNumericMatrix(1,1,mxDOUBLE_CLASS,mxREAL) *mxGetPr(mx) = 1 mxSetFieldByNumber(outarray, j,i,mx) if i want to use the same type of code for numeric Matrix for data type mxINT32_CLASS what should i use in place of mxGetPr?? Thanks, NILESH
From: Steven_Lord on 27 Jul 2010 09:29 "Nilesh " <nileshjavar(a)gmail.com> wrote in message news:i2mj7g$lrl$1(a)fred.mathworks.com... > hello , > > i am using mxGetPr for Double type.but what am i supposed to use for int > data type. > > for example > mxArray * mx = mxCreateNumericMatrix(1,1,mxDOUBLE_CLASS,mxREAL) > *mxGetPr(mx) = 1 > mxSetFieldByNumber(outarray, j,i,mx) > > > if i want to use the same type of code for numeric Matrix for data type > mxINT32_CLASS > what should i use in place of mxGetPr?? http://www.mathworks.com/access/helpdesk/help/techdoc/apiref/mxgetdata.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Nilesh on 28 Jul 2010 07:26 "Steven_Lord" <slord(a)mathworks.com> wrote in message <i2mmvr$sj0$1(a)fred.mathworks.com>... > > > "Nilesh " <nileshjavar(a)gmail.com> wrote in message > news:i2mj7g$lrl$1(a)fred.mathworks.com... > > hello , > > > > i am using mxGetPr for Double type.but what am i supposed to use for int > > data type. > > > > for example > > mxArray * mx = mxCreateNumericMatrix(1,1,mxDOUBLE_CLASS,mxREAL) > > *mxGetPr(mx) = 1 > > mxSetFieldByNumber(outarray, j,i,mx) > > > > > > if i want to use the same type of code for numeric Matrix for data type > > mxINT32_CLASS > > what should i use in place of mxGetPr?? > > http://www.mathworks.com/access/helpdesk/help/techdoc/apiref/mxgetdata.html > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > To contact Technical Support use the Contact Us link on > http://www.mathworks.com Thanks. NILESH
|
Pages: 1 Prev: Counting the number of data points in a plot Next: simplify |