Check if a number is complex with MEX.

조회 수: 3 (최근 30일)
Fio
Fio 2014년 4월 4일
답변: Sravan Janamaddi 2019년 11월 19일
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