This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mxCopyComplex16ToPtr (Fortran)

COMPLEX*16 values from Fortran array to pointer array

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

Fortran Syntax

Interleaved complex API

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

Separate complex API

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

Input Arguments

y

COMPLEX*16 Fortran array

pd

Pointer to a complex double-precision MATLAB® array

pr

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

pi

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

n

Number of elements to copy

Output Arguments

status

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

Description

mxCopyComplex16ToPtr copies n COMPLEX*16 values from the Fortran COMPLEX*16 array y into the MATLAB array 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.

Examples

See these examples in matlabroot/extern/examples/refbook:

Introduced before R2006a