MEX Function Logical to integer type conversion

조회 수: 8 (최근 30일)
Harshit
Harshit 2012년 10월 5일
Hi, Suppose I have a matlab function which I am calling from mex files is returning logical matrix (or variables) . I want to make complex numbers using half of these entries as real and other half as imaginary. I want to convert logical variables into integer . Is there a way to do. Assigning directly is not working. I also tried explicit type conversion (getting zero array as an output). I am using mxCreateNumericMatrix to generate my integer matrix and mxCreatelogicalMatrix for getting logical values.
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2012년 10월 5일
Could you please post your MEX-code?
James Tursa
James Tursa 2012년 10월 5일
Could you show how you are attempting to "assign directly"? Is your real/imaginary data interleaved in memory?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by