Check if a number is complex with MEX.

3 visualizaciones (últimos 30 días)
Fio
Fio el 4 de Abr. de 2014
Respondida: Sravan Janamaddi el 19 de Nov. de 2019
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.

Respuestas (1)

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

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by