8
Comment:

3725
english language

Deletions are marked like this.  Additions are marked like this. 
Line 1:  Line 1: 
Matlab  <<TableOfContents(3)>> = Page is under construction = = Matlab = Matlab is a highlevel language and interactive environment for numerical computation, visualization, and programming. == Start Matlab == * Start it on Linux: Applications  Accessories  Terminal. Then type: Matlab (Enter) * Start it on Windows: Start  Matlab  Matlab == First Steps == See the MatlabDocumentation in Matlab: Help  Product Help  Getting Started == Matlab Compiler == * mcc (both: UNIX and Windows) is the MATLAB Compiler. You can use the mcc command either from the MATLAB command prompt (MATLAB mode) or the commandline (standalone mode). * More info: See the MatlabDocumentation in Matlab: Help  Product Help  Matlab Compiler == How to use Matlab Compiler on Linux == * This chapter describes how to use MATLAB Compiler to code and build standalone applications. * Standalone Applications executables don't need any Matlab Licences. == Magic Square Example == * A magic square is an array of integers arranged so that their sum is the same when added vertically, horizontally, or diagonally. * Copy the following code in a textfile and save it as magicsquare.m {{{ function m = magicsquare(n) %MAGICSQUARE generates a magic square matrix of the size % specified by the input parameter n. % Copyright 20032011 The MathWorks, Inc. if ischar(n) n=str2num(n); end m = magic(n); }}} * Start a Terminal (Applications  Accessoires  Terminal) and change to the directory where you stored magicsquare.m * Compile the magicsqure function: {{{ mcc mv magicsquare.m }}} * This generates you 2 files: magicsquare and magicsquare.sh * magicsquare is the main file of the application. * magicsquare.sh is the script to start the application. It temporarily sets up the environment variables needed at runtime and executes the application. On Windows, mcc doesn't generate this run script file, because the environment variables have already been set up by the installer. On Windows, only the file magicsquare.exe would be generated. * Run the application {{{ }}} * enter magicsquare(5), and view the results. * Help on mcc: mcc help or see Documentation in Matlab. * Help on deploytool = Limited amount of licenses = The number of MATLAB licences is limited. To ensure a fair and efficient usage of the licences throughout the ETH the following measures have been put in place: * licences will be returned if not used for 4 hours * excessive usage of licences will be monitored and users will be asked to return licences if needed == What can you do? == 1. Compile your MATLAB program. The best approach to avoid excessive usage of MATLAB licences is to compile your MATLAB program. The resulting executable does not need ANY MATLAB licence! This frees you from all MATLAB licence restrictions and also allows you to provide your executable to users without a MATLAB installation. 1. Exit MATLAB when finished. Only then will all used licences be given back. 1. Register the need for many MATLAB licences due to a MATLAB course By registering your need in advance, we can take countermeasures and ensure that these licences are available. 1. Buy your own MATLAB licences if you must have a guaranteed 24/7 service or if you need to use an excessive amount of licences. == Matlab on the cluster == * Every MatlabJob on the Cluster uses one license. Therefore its very important, to run only compiled MatlabApplications on the cluster. == How do I know which MATLAB licences I use? == * The MATLAB command "license('inuse')" lists the licences checked out for the current MATLAB session. 
Contents
Page is under construction
Matlab
Matlab is a highlevel language and interactive environment for numerical computation, visualization, and programming.
Start Matlab
 Start it on Linux: Applications  Accessories  Terminal. Then type: Matlab (Enter)
 Start it on Windows: Start  Matlab  Matlab
First Steps
See the MatlabDocumentation in Matlab: Help  Product Help  Getting Started
Matlab Compiler
 mcc (both: UNIX and Windows) is the MATLAB Compiler. You can use the mcc command either from the MATLAB command prompt (MATLAB mode) or the commandline (standalone mode).
 More info: See the MatlabDocumentation in Matlab: Help  Product Help  Matlab Compiler
How to use Matlab Compiler on Linux
 This chapter describes how to use MATLAB Compiler to code and build standalone applications.
 Standalone Applications executables don't need any Matlab Licences.
Magic Square Example
 A magic square is an array of integers arranged so that their sum is the same when added vertically, horizontally, or diagonally.
 Copy the following code in a textfile and save it as magicsquare.m
function m = magicsquare(n) %MAGICSQUARE generates a magic square matrix of the size % specified by the input parameter n. % Copyright 20032011 The MathWorks, Inc. if ischar(n) n=str2num(n); end m = magic(n);
 Start a Terminal (Applications  Accessoires  Terminal) and change to the directory where you stored magicsquare.m
 Compile the magicsqure function:
mcc mv magicsquare.m
 This generates you 2 files: magicsquare and magicsquare.sh
 magicsquare is the main file of the application.
 magicsquare.sh is the script to start the application. It temporarily sets up the environment variables needed at runtime and executes the application. On Windows, mcc doesn't generate this run script file, because the environment variables have already been set up by the installer. On Windows, only the file magicsquare.exe would be generated.
 Run the application
 enter magicsquare(5), and view the results.
 Help on mcc: mcc help or see Documentation in Matlab.
 Help on deploytool
Limited amount of licenses
The number of MATLAB licences is limited. To ensure a fair and efficient usage of the licences throughout the ETH the following measures have been put in place:
 licences will be returned if not used for 4 hours
 excessive usage of licences will be monitored and users will be asked to return licences if needed
What can you do?
 Compile your MATLAB program. The best approach to avoid excessive usage of MATLAB licences is to compile your MATLAB program. The resulting executable does not need ANY MATLAB licence! This frees you from all MATLAB licence restrictions and also allows you to provide your executable to users without a MATLAB installation.
 Exit MATLAB when finished. Only then will all used licences be given back.
 Register the need for many MATLAB licences due to a MATLAB course By registering your need in advance, we can take countermeasures and ensure that these licences are available.
 Buy your own MATLAB licences if you must have a guaranteed 24/7 service or if you need to use an excessive amount of licences.
Matlab on the cluster
 Every MatlabJob on the Cluster uses one license. Therefore its very important, to run only compiled MatlabApplications on the cluster.
How do I know which MATLAB licences I use?
 The MATLAB command "license('inuse')" lists the licences checked out for the current MATLAB session.