Main Content

mxMakeArrayReal (Fortran)

Convert complex mxArray to real, preserving real data

Fortran Syntax

#include "fintrf.h"
integer*4 mxMakeArrayReal(pa)
mwPointer pa

Description

Use mxMakeArrayReal to convert a complex mxArray to a real mxArray. The array contains the data from the real part of the original array. If the original mxArray is real, then the function does nothing.

Input Arguments

expand all

Pointer to a numeric mxArray array.

Output Arguments

expand all

Function status, returned as integer*4. If successful, then the function returns 1.

Returns 0 if unsuccessful. The function is unsuccessful if pa is NULL, nonnumeric, or read-only.

Version History

Introduced in R2018b