Matlab to c code

Hi, I have written a module using Principal component analysis (PCA) .Input to my code is (1000x7) values. Now I want to convert my Matlab code into a c code or c++ code. I’m having Matlab functions like eigs (which I’m using to get Eigen value and Eigen vector), norminv in my code. When I’m trying to convert my Matlab codes to c code, i’m getting an error saying that Matlab cannot convert these functions (eigs, normniv) to equivalent c code and asked to make those functions as a extrinsic function. I tried to write a separate c code for Eigen values and Eigen vectors but since my input matrix is a non-symmetric matrix i can’t write a code, even i go through Numerical Recipes in C book they are saying that we can write a code only to a symmetric matrix.
Please anybody help me to solve this prob. Thanks in advance.

2 comentarios

Titus Edelhofer
Titus Edelhofer el 20 de Abr. de 2012
Just to make sure we know what you are doing: do you use MATLAB Coder for conversion to C (or Embedded MATLAB/Real-Time Workshop, if you are using a pre-R2011a version)?
Rajesh
Rajesh el 25 de Abr. de 2012
Hi Mr.Titus,
I'm using "matlab coder project interface" to convert the code.

Iniciar sesión para comentar.

Respuestas (1)

RAJKUMAR Palaniappan
RAJKUMAR Palaniappan el 20 de Abr. de 2012

0 votos

use help mex/help mcc in your command window
you can find some thing useful to you in the below mentioned link

3 comentarios

Rajesh
Rajesh el 20 de Abr. de 2012
Hi Rajkumar,
i tried using the mex and mcc commend , but I'm getting the same error as i mentioned above. its telling to keep the eigs and norminv as extrinsic .
thank you
Rajesh
Rajesh el 20 de Abr. de 2012
and i converted the remaining part of my code to c code expect the eign and norminv part.
Friedrich
Friedrich el 25 de Abr. de 2012
You have your C code, than you can look for coder.ceval. Maybe this helps

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Coder en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 20 de Abr. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by