MATLAB (matrix laboratory) is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, and Fortran.
Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and Model-Based Design for dynamic and embedded systems.
In 2004, MATLAB had around one million users across industry and academia. MATLAB users come from various backgrounds of engineering, science, and economics. MATLAB is widely used in academic and research institutions as well as industrial enterprises.
- Taken from Wikipedia.
Starting Matlab from the G-bar
- Logging into the G-bar via ThinLinc.
- Choose the menu item "Matlab" under "DTU" -> "Mathematics"
or directly in a terminal by typing:
$ matlab &
The & lets you continue using the terminal, although you have just started a program.
To run different versions:
Applications Menu -> DTU -> xterm (application node)
Then for version 2017a
matlab920
(type matlab then tab tab to see the other versions)
How to get Matlab for your own computer
The G-bar also provides Matlab as a download for students and employees. Different versions can be downloaded from the downloads page downloads.cc.dtu.dk in .iso format (The linux version will only run on a 64Bit OS). The native installer from Mathworks own homepage can also be used. Different toolboxes can be chosen for download as well.
In the "Matlab"->"Student" directory, a complete guide on how to install Matlab is also provided.
The guide is found as a .pdf file with the name Guide_for_End-Users_of_TAH_Student_License.pdf. It is essential that all the steps are followed correctly or it will not work.
It is a requirement to create an account at Mathworks in order to obtain a license. When this account is created it is very important that the email which is associated with the account, is a student email from DTU or the license will not work.
If you are a DTU employee or Phd, you must use the staff license, not the student license.
How to use Matlab
When opening Matlab you will see a bunch of windows as following:
- Command Window
- Editor
- Workspace
- Current Directory
- Command History
Troubleshooting Matlab
Matlab will not start, error message: unable to initialize com.mathworks.mwswing.MJStartup
Remove the file classpath.txt in your home directory, and start Matlab again.
Matlab will not start, only the splash screen shows, and then nothing
Remove the file classpath.txt in your home directory, and start Matlab again.
I get a screen full of (Java) error messages when trying to open Matlab or the Matlab editor.
Check if you have a file called classpath.txt in your home directory, and remove this file before you start Matlab.
I use surf to plot a 3d surface, but the plot is empty
This is a bug in Matlab, and appears only if you use the new version for the first time, and still have the information bar ("Note new toolbar buttons ...") active. Close this bar by clicking on the 'x' to the right, and the figure should appear.
I can not get the | (pipe) character.
Due to an error in programs with a Java GUI (like Matlab) it is difficult to make a | (pipe). You can get a | by pressing Shift, Alt Graph and the button with <, > and \.
I would like to save the Matlab search path, but Matlab can not save the path
You should make a folder called matlab in your home directory - it is important that the folder is named matlab in lower-case letters. If you save the search path to this folder Matlab will use this search path in all further Matlab sessions.
Which toolboxes are available?
You can see the list of available toolboxes (and versions) by running
ver
in a Matlab session. Please note that DTU does not have an unlimited amount of licenses for all toolboxes, and some toolboxes may thus be unavailable at certain times.
The license is about to expire - what to do?
If you see this message on a computer with a network license, e.g. in the databars, don't worry! We will make sure that the new license is in place before the expiration date.
If you see this message on your own computer with a stand-alone license, do the following: In the Matlab GUI, go to 'Help' -> 'Licensing' -> 'Update license ...'. This should solve the problem.
If you still get an error message after updating the license, you might have to activate Matlab again. Start the program 'activate_matlab' (it is installed in the Matlab directory), and activate Matlab again. The activation key can be found on the software download server downloads.cc.dtu.dk