MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Manual do Utilizador Página 10: Direct Approach Distribution

Compiling Your MATLAB Code

If you do not plan to use the compiled M-code approach, skip this section and continue with
Distributing Your
MATLAB Code
.
Compiling your MATLAB M-code into a standalone executable is described in the
MATLAB Compiler Documentation
.
Please refer to this documentation to understand all of the options available to you. To summarize the simplest case,
from within MATLAB, at the MATLAB prompt, execute the following command:
mcc -m
analyzeThis
where
analyzeThis
is the name of your entry function. This command generates the following files in your
$MATLAB_ROOT/work
directory:
analyzeThis (Linux, Mac OS X)
or
analyzeThis.exe (Windows)
Executable file
analyzeThis.ctf
Component Framework file
analyzeThis.c (Linux, Windows)
C language Source Code
analyzeThis.h (Linux, Windows
C Language Header file
analyzeThis_main.c
C language Source Code
analyzeThis_mcc_component_data.c
C language Source Code
Note:
To use the MATLAB compiler on Mac OS X, you must have Xcode 2.2 installed; minimally, the Developer
Tools, gcc 4.0, gcc 3.3, Mac OS X SDK, and BSD SDK. These instructions were tested using Xcode 2.2.1.

Distributing Your MATLAB Code

After writing your MATLAB code, use the GenePattern Web Client to create a GenePattern task that invokes the code
that you have written.
Creating Tasks
describes how to create a GenePattern task. This section provides
supplemental information for MATLAB:
●
Direct Approach Distribution
●
Compiled Approach Distribution

Direct Approach Distribution

Creating Tasks
describes how to create a GenePattern task that invokes the code that you have written. This section
provides additional information that applies when you are directly calling the MATLAB executable from the
GenePattern task:
●
Windows Command Line
●
Preferred Command Line
Windows Command Line
On Windows, your GenePattern task definition form can contain a simple command line that calls MATLAB with the -r
flag to execute your function; for example:
matlab -nosplash -r "analyzeThis <p1> <p2>"
This example invokes MATLAB without the splash screen (
-nosplash
) and directs it to execute the quoted
command, where
p1
and
p2
are parameters that you specify in the GenePattern task definition form and that are
passed to the MATLAB command line as Strings. MATLAB looks for the function
analyzeThis
on the MATLAB
path; therefore, it is not necessary to upload the function as a support file, although it is recommended.
To ensure that the GenePattern server can call the MATLAB executable, you typically add the MATLAB directory to
your PATH system environment variable. (Alternatively, you can enter the full path to the MATLAB executable on the
command line, but this makes it more difficult to deploy the module on other GenePattern servers.)
10

Ficheiro PDF · ·

Imprimir

Imprimir documento

Partilha

Perguntas sobre MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE

Ainda não há perguntas sobre este manual. Faça a primeira.

Fazer uma pergunta

Respondemos a partir do manual e indicamos a página. A pergunta é publicada no site depois de verificada.

Todas as perguntas e respostas ›

Manuais e produtos relacionados com Software MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE