Main Content

mxCopyPtrToComplex8 (Fortran)

COMPLEX*8 values from pointer array to Fortran array

The function signature for mxCopyPtrToComplex8 is different in the Interleaved Complex API.

Fortran Syntax

Interleaved complex API

#include "fintrf.h"
integer*4 mxCopyPtrToComplex8(pd, y, n)
mwPointer pd
complex*8 y(n)
mwSize n

Separate complex API

#include "fintrf.h"
subroutine mxCopyPtrToComplex8(pr, pi, y, n)
mwPointer pr, pi
complex*8 y(n)
mwSize n

Input Arguments

pd

Pointer to a complex double-precision MATLAB® array

pr

Pointer to the real data of a single-precision MATLAB array

pi

Pointer to the imaginary data of a single-precision MATLAB array

y

COMPLEX*8 Fortran array

n

Number of elements to copy

Output Arguments

status

Function status, returned as integer*4 when using the interleaved complex API.

Description

mxCopyPtrToComplex8 copies n COMPLEX*8 values from the specified MATLAB arrays into the Fortran COMPLEX*8 array y. The MATLAB arrays are pointed to by:

  • pd when using the interleaved complex API, built with the -R2018a option.

  • pr and pi when using the separate complex API, built with the -R2017b option.

Sets up standard Fortran arrays for passing as arguments to or from the computation routine of a MEX-file. Use this subroutine with Fortran compilers that do not support the %VAL construct.

Version History

Introduced before R2006a