# mxCopyComplex16ToPtr, mxCopyPtrToComplex16

## Purpose

Copy `COMPLEX*16` values between Fortran and pointer arrays.

## Fortran Synopsis

    subroutine mxCopyPtrToComplex16(pi,pi,y,n)
    subroutine mxCopyComplex16ToPtr(y,pr,pi,n)
    complex*16 y(n)
    integer*4 pr, pi, n

## Arguments

`n`
  number of elements to copy
`pi`
  pointer to `pi` array
`pr`
  pointer to `pr` array
`y`
  `COMPLEX*16` Fortran array

## Description

These routines provide a way to copy `COMPLEX*16` values between MATLAB `pr` / `pi` arrays and Fortran `COMPLEX*16` arrays. These are essential for use with Fortran compilers that do not support the `%VAL` construct in order to set up standard Fortran arrays for passing as arguments to the computation routine of a MEX-file.

`mxCopyPtrToComplex16(pr, pi, y, n)` copies `n` `COMPLEX*16` values from the MATLAB arrays pointed to by`pr` and`pi` into the Fortran `COMPLEX*16` array `y`.

`mxCopyComplex16ToPtr(y, pr, pi,n)` copies `n` `COMPLEX*16` values from the Fortran `COMPLEX*16` array `y` into the MATLAB arrays pointed to by `pr` and`pi`.

(c) Copyright 1994 by The MathWorks, Inc.