Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe07.iad.POSTED!7564ea0f!not-for-mail
From: Walter Roberson <roberson@hushmail.com>
Organization: Canada Eat The Cookie Foundation
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: Converting Matlab .m file into C code
References: <fgu4nb$6fe$1@fred.mathworks.com> <gc38je$oj6$1@fred.mathworks.com> <ApbFk.8020$i84.6499@newsfe10.iad> <gc3ke6$t4b$1@fred.mathworks.com>
In-Reply-To: <gc3ke6$t4b$1@fred.mathworks.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 23
Message-ID: <DNdFk.46485$891.4395@newsfe07.iad>
NNTP-Posting-Host: 24.79.146.116
X-Complaints-To: internet.abuse@sjrb.ca
X-Trace: newsfe07.iad 1222994147 24.79.146.116 (Fri, 03 Oct 2008 00:35:47 UTC)
NNTP-Posting-Date: Fri, 03 Oct 2008 00:35:47 UTC
Date: Thu, 02 Oct 2008 19:36:26 -0500
Xref: news.mathworks.com comp.soft-sys.matlab:493409


Judy wrote:
> I thought that the MATLAB Compiler converts the m code into C..

Not any more.

> So instead it is the libraries that are being shared and C can read the m code in
> this way?

> In other words, we would still need to use matlab as an interim step as the
> compiler to get to C..?

Unless you are using one of the Builders, or Embedded Matlab, or the Real Time
Workshop, then the modern versions of the matlab compilers transform each .m file
into encrypted binary data files. The matlab compiler "executable" is a program that
knows how to decrypt the binary data files and step through the resulting
structured binary data, each bit of which is interpreted as either control logic
or calls to the matlab libraries. No C is generated or compiled (not unless 
you had some mex in the mix.)

With the generated files being binary data files, they are portable to different
operating systems: you just have to replace the interpreter portion and use the same
encrypted binary data files, instead of having to generate code for each different
operating system and each different architecture that you want to run on.