f



C code from MATLAB code

Hi

I have a complex algorithm that eventually will be encoded in C to
run on a DSP or Controller (e.g. Hitachi SH4). The present MATLAB
implementation under WINDOWS calls advanced standard MATLAB routines
such as fft, matrix factorizations, eigenvalue solvers, fmincon (for
nonlinear optimization subject to nonlinear constraints), and some
number theoretic functions. I figure that the transcription to an
optimized C code requires many months of hard labor. Before I embark
on this adventure, I would like to generate from my MATLAB code (as
easily as possible, i.e. as automatically as possible) a
non-optimized C code that can be compiled for the Controller - just
to get an idea how my algorithm fares on the Controller. First tests
with the MATLAB C Compiler applied to very simple MATLAB programs
indicate that this is not the right way to proceed. Suggestions as to
how I can generate C code from MATLAB quicky are most welcome!

J�rg Weilenmann
LEICA Geosystems AG
CH-9435 Heerbrugg
0
8/20/2004 6:16:34 AM
comp.soft-sys.matlab 211266 articles. 24 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
967 Views

Similar Articles

[PageSpeed] 54

J�rg Weilenmann wrote:
>
>
> Hi
>
> I have a complex algorithm that eventually will be encoded in C to
> run on a DSP or Controller (e.g. Hitachi SH4). The present MATLAB
> implementation under WINDOWS calls advanced standard MATLAB
> routines
> such as fft, matrix factorizations, eigenvalue solvers, fmincon
> (for
> nonlinear optimization subject to nonlinear constraints), and some
> number theoretic functions. I figure that the transcription to an
> optimized C code requires many months of hard labor. Before I
> embark
> on this adventure, I would like to generate from my MATLAB code (as
> easily as possible, i.e. as automatically as possible) a
> non-optimized C code that can be compiled for the Controller - just
> to get an idea how my algorithm fares on the Controller. First
> tests
> with the MATLAB C Compiler applied to very simple MATLAB programs
> indicate that this is not the right way to proceed. Suggestions as
> to
> how I can generate C code from MATLAB quicky are most welcome!
>
> J�rg Weilenmann
> LEICA Geosystems AG
> CH-9435 Heerbrugg

Well, quicky you can't but it really worths to learn how to build
mex-file. If you code use a lot of FFT & Matrices Algebra you should
use libs that Matlab call directly : FFTW & BLAS. For the
optimization step, there are also some free GPL lib.

It would not take mouth if you are on the right track directly....

S�bastien
0
SeBy (232)
8/20/2004 6:53:44 AM
Reply: