mxCopyReal8ToPtr, mxCopyPtrToReal8

Purpose

Copy REAL*8 values between Fortran and pointer arrays.

Fortran Synopsis

subroutine mxCopyPtrToReal8(px,y,n)
subroutine mxCopyReal8ToPtr(y,px,n)
real*8 y(n)
integer*4 px, n

Arguments

n
number of elements to copy
px
pointer to pr or pi array
y
REAL*8 Fortran array

Description

These routines provide a way to copy REAL*8 values between MATLAB pr or pi arrays and Fortran REAL*8 arrays. They 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.

mxCopyPtrToReal8(px,y,n) copies n REAL*8 values from the MATLAB array pointed to by px into the Fortran REAL*8 array y.

mxCopyReal8ToPtr(y,px,n) copies n REAL*8 values from the Fortran REAL*8 array y into the MATLAB array pointed to by px.

(c) Copyright 1994 by The MathWorks, Inc.