How to return a vector from C++ MEX to MATLAB?

Hello All,
I'm trying to return an array from C++ MEX file to MATLAB,
I can return a scalar value when I use "outputs[0] = factory.createScalar(SCALAR VALUE);"
Is there anything similar but return an array instead of scalar?
Thanks

Antworten (1)

Swatantra Mahato
Swatantra Mahato am 2 Jul. 2021

0 Stimmen

Hi,
Kindly refer to the following documentation link for examples on how to use arrays from a C++ mex file in MATLAB
Hope this helps

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020b

Gefragt:

am 29 Jun. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by