copying arrays of complex numbers in c mex files
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!