copying arrays of complex numbers in c mex files

Hi there,
In C-mex-file I am using arrays of complex numbers (ISO C99). The calculations done with complex variables are easy to write, so it is not desirable to split them into two arrays for Re and Im. As far as I know, C complex numbers are stored as a couple of reals. If I wanted to copy the real and imaginary parts to areas given by mxGetPr, mxGetPi, I would need to pick the Re/Im parts in a cycle element by element, which which I ended up.
Or, is it possible to use some 'slicing' modification of memcpy with a given step ?
Thanks a lot for your ideas ! Lukas

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Asked:

on 25 May 2012

Community Treasure Hunt

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

Start Hunting!