MEX Function Logical to integer type conversion

4 vues (au cours des 30 derniers jours)
Harshit
Harshit le 5 Oct 2012
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 commentaires
Kaustubha Govind
Kaustubha Govind le 5 Oct 2012
Could you please post your MEX-code?
James Tursa
James Tursa le 5 Oct 2012
Could you show how you are attempting to "assign directly"? Is your real/imaginary data interleaved in memory?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by