MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Manual do Utilizador Página 9: Adapting Your MATLAB Code
●
Distributing Your MATLAB Code
●
Example: Deploying a Compiled MATLAB Application
Two Approaches: Direct and Compiled
You can invoke a MATLAB executable from a GenePattern module using one of two approaches: the direct approach
or the compiled approach. Following are brief descriptions of each approach, including its advantages and
disadvantages:
●
Direct approach
. In the direct approach, the GenePattern task directly invokes the MATLAB executable, which
executes your M-code. This approach is best suited for use on a standalone GenePattern server, where you
already have a MATLAB license and you will not redistribute the MATLAB-based GenePattern modules to other
users who do not have their own MATLAB licenses. The advantages to this approach are: it is the simplest way
to getting your M-code running on GenePattern, it can be used for any MATLAB and GenePattern supported
platform, and it allows for easier modification of the M-code files as you modify your analysis. The disadvantages
of this approach are: it requires a MATLAB license for each concurrent user on the GenePattern server machine
and, if you change platforms, you must change the command line because different platforms have different
methods of passing arguments to MATLAB.
●
Compiled approach
. In the compiled approach, you use the MATLAB Compiler to generate a standalone
executable; the GenePattern task then invokes that executable. The advantages to this approach are: it allows
redistribution of the module to other GenePattern users who do not have their own MATLAB license and it can
be run on a shared server without needing to get a MATLAB license for each concurrent user. The
disadvantages are: it requires you to have a MATLAB Compiler license, it can be used only on platforms
supported by the MATLAB Compiler, it must be compiled separately for each platform, and the GenePattern
server must have the MATLAB Component Runtime (MCR) installed before it can run the compiler-generated
executable.
If you are simply using your M-code on your standalone GenePattern server, the direct approach is simpler; however,
if you want to give copies of your M-code to other people or deploy your M-code on a shared GenePattern server, the
compiled approach is preferred. The compiled approach may provide slightly better performance for fast running
tasks since the startup delay will be shorter, but the actual execution time will be approximately the same for either
approach.
MATLAB Versions
The instructions in this section are based on the following MATLAB versions:
●
MATLAB 7.1 (part of Release 14). Earlier versions of MATLAB use a different (deprecated) mechanism for
deployment, which is not compatible with the instructions provided in this guide. For Mac OS X, these
instructions were tested using MATLAB 7.2.
●
MATLAB Compiler 4.0 or later. The MATLAB Compiler is currently available on Windows, Unix, and Mac OS X;
therefore, these are the only platforms on which you may deploy a compiled MATLAB-based task. For Mac OS
X, these instructions were tested using the MATLAB Compiler 4.4.
The MATLAB Compiler generates executables only for the platform on which it is executing. For example, if you
create a MATLAB executable on Windows, the MATLAB-based module that invokes that executable can only be
deployed on a GenePattern server running under Windows. Therefore, you need a MATLAB (and MATLAB
Compiler) license for each platform on which you wish to deploy your executable.
Adapting Your MATLAB Code
When you create a task in GenePattern, you specify the command line that invokes the program that performs the
desired function. Generally, the command line includes arguments, such as the parameters for the algorithm and the
data file to analyze.
Calling script M-code from a command line is possible, but generally not useful because you cannot pass arguments
to the script. To pass arguments to your M-code, create a no-return entry function to serve as the top level call into
MATLAB. The following example defines a no-return entry function that accepts two parameters:
function analyzeThis ( filename, whatToWrite )
... (your M-code here)
Writing Modules for GenePattern
provides additional guidelines for writing code that will run as a GenePattern task.
9
Ficheiro PDF · ·
Perguntas sobre MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE
Ainda não há perguntas sobre este manual. Faça a primeira.
Manuais e produtos relacionados com Software MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE
- Software MATLAB CURVE FITTING TOOLBOX - RELEASE NOTES Manual do Utilizador
(54 páginas) - Software MATLAB GAUGES BLOCKSET RELEASE NOTES Guia do Utilizador
(114 páginas) - Software MATLAB EMBEDDED IDE LINK 4 - FOR USE WITH TEXAS INSTRUMENTS CODE COMPOSER STUDIO Especificações
(126 páginas) - Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Especificações
(216 páginas) - Software MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guia do Utilizador
(386 páginas) - Software MATLAB BUILDER EX 1 Guia do Utilizador
(164 páginas) - Software MATLAB DATABASE TOOLBOX RELEASE NOTES Manual do Utilizador
(37 páginas) - Software MATLAB VIDEO AND IMAGE PROCESSING BLOCKSET 3 Guia do Utilizador
(252 páginas) - Software MATLAB SYSTEMTEST RELEASE NOTES Guia de Instalação
(237 páginas) - Software MATLAB TARGET SUPPORT PACKAGE - RELEASE NOTES Manual do Utilizador
(54 páginas) - Software MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de Serviço
(282 páginas) - Software MATLAB PARTIAL DIFFERENTIAL EQUATION TOOLBOX 1 Manual do Utilizador
(18 páginas) - Software MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Guia do Utilizador
(574 páginas) - Software MATLAB IMAGE ACQUISITION TOOLBOX 3 Guia do Utilizador
(408 páginas) - Software MATLAB XPC TARGET RELEASE NOTES Manual do Utilizador
(51 páginas) - Software MATLAB TARGET SUPPORT PACKAGE - RELEASE NOTES Manual do Utilizador
(42 páginas) - Software MATLAB BUILDER JA 2 Guia do Utilizador
(292 páginas) - Software MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guia do Utilizador
(210 páginas) - Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guia do Utilizador
(759 páginas) - Software MATLAB CONTROL SYSTEM TOOLBOX 9 Especificações
(591 páginas)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22