Main Content

mxCopyReal4ToPtr (Fortran)

REAL*4 values from Fortran array to pointer array

Fortran Syntax

#include "fintrf.h"
subroutine mxCopyReal4ToPtr(y, px, n)
real*4 y(n)
mwPointer px
mwSize n



REAL*4 Fortran array


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


Number of elements to copy


mxCopyReal4ToPtr copies n REAL*4 values from the Fortran REAL*4 array y into the MATLAB array pointed to by px, either a pr or pi array.

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.

Introduced before R2006a