Check if a number is complex with MEX.

3 次查看(过去 30 天)
Hi!
I would like to test if a number is complex. With Matlab I can do that using the function imag
imag(x)!=0 .
How can I do that using a mex file?
Thank you very much.

回答(1 个)

Sravan Janamaddi
Sravan Janamaddi 2019-11-19
Though it is late adding for future reference,
Yes we can verify by using "mxIsComplex(<pointer>)".
Thanks

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by