From: Nilesh on
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


"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
"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