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 Center および File ExchangeWrite 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