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.

mxMakeArrayComplex (Fortran)

Convert real mxArray to complex, preserving real data

Fortran Syntax

#include "fintrf.h"
interger*4 mxMakeArrayComplex(pa)
mwPointer pa

Description

Use mxMakeArrayComplex to convert a real mxArray to a complex mxArray. The real part of the updated array contains the real data from the original array.

If pa is empty, then the function returns a complex empty mxArray.

If pa is complex, then the function does nothing.

Input Arguments

expand all

Pointer to a numeric mxArray array.

Output Arguments

expand all

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

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

Introduced in R2018b