matlab mxgetpi函数语法

发表matlab mxgetpi函数相关文章
一句话说明: Imaginary data elements in array of type DOUBLE

mxGetPi (C and Fortran)

Imaginary data elements in array of type DOUBLE

C Syntax

#include "matrix.h"
double *mxGetPi(const mxArray *pm);

Fortran Syntax

mwPointer mxGetPi(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray of type double

Returns

Pointer to the imaginary data elements of the specified mxArray, on success. Returns NULL in C (0 in Fortran) if there is no imaginary data or if there is an error.

Description

Use mxGetPi on arrays of type double only. Use mxIsDouble to validate the mxArray type. For other mxArray types, use mxGetImagData.

The pi field points to an array containing the imaginary data of the mxArray. Call mxGetPi to get the contents of the pi field, that is, to get the starting address of this imaginary data.

The best way to determine whether an mxArray is purely real is to call mxIsComplex.

If any of the input matrices to a function are complex, MATLAB® allocates the imaginary parts of all input matrices.

Examples

See the following examples in matlabroot/extern/examples/refbook.

For Fortran examples, see:

See the following examples in matlabroot/extern/examples/mx.

See the following examples in matlabroot/extern/examples/mex.

See Also

mxGetPr, mxSetPi, mxSetPr, mxGetImagData, mxIsDouble

欢迎转载,转载请注明来自一手册:http://yishouce.com/matlab/func/mxgetpi

与matlab mxgetpi用法相关的文章

友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1