From: Kumar Sambhav on
I have obtained C code by converting the MATLAB code into C using mcc function. It is functioning very slow. How can I make it run fast like C?? I am using MATLAB 2009b.

Best Regards,
Sambhav.
From: Ashish Uthama on
On Wed, 14 Apr 2010 05:09:39 -0300, Kumar Sambhav <sambhav(a)iitk.ac.in>
wrote:

> I have obtained C code by converting the MATLAB code into C using mcc
> function. It is functioning very slow. How can I make it run fast like
> C?? I am using MATLAB 2009b.
>
> Best Regards,
> Sambhav.

The result of compiling is not C code in the sense that you appear to
believe.
http://www.mathworks.com/support/solutions/en/data/1-1ARNS/?solution=1-1ARNS

some of your options:
-optimize the MATLAB code (vectorize/preallocate/better algo)
-after careful profiling, consider write mex routines for hot spots
-consider using EML (this is closer to your concept of 'obtaining C code'
-reimplement your algo in C from scratch