Running Matlab__linux on the Linux command line

Source: Internet
Author: User

After the installation of MATLAB in Linux, will be generated under the/usr/local/bin/matlab file, you can use the MATLAB command.

Usage:matlab [-h|-help] | [-n |-e]
[-arch | v=variant | v=arch/variant]
[-C LicenseFile] [-display xdisplay |-nodisplay]
[-nosplash] [-mwvisual Visualid] [-debug] [-softwareopengl]
[-desktop |-nodesktop |-NOJVM]
[R Matlab_command] [-logfile log]
[-ddebugger [Options]]

-h|-help-display arguments.
-n-display Final environment variables,
arguments, and other diagnostic
Information. The MATLAB is not run.
-e-display all the environment variables and
Their values to standard output. Matlab
is not run. If The exit status is not
0 on return then the variables and values
May is correct.
-arch-start MATLAB assuming architecture arch.
V=variant-start the version of MATLAB found
In Bin/glnxa64/variant instead of Bin/glnxa64.
V=arch/variant-start the version of MATLAB found
In Bin/arch/variant instead of Bin/glnxa64.
-C Licensefile-set Location of the license file that MATLAB
should use. It can have the form port@host or
Be a colon separated list of license files.
The Lm_license_file and Mlm_license_file
Environment variables would be ignored.
-display xdisplay-send x commands to x server display, Xdisplay.
-nodisplay-do not display any X commands. The MATLAB
Desktop won't be started. However, unless
-NOJVM is also provided the Java virtual machine
would be started.
-nosplash-do not display the splash screen during startup.
-mwvisual visualid-the default X visual to use for figure windows.
-debug-provide debugging information especially for X
Based problems.
-desktop-allow the MATLAB desktop to is started by a
Process without a controlling terminal. This is
Usually a required command line argument
Attempting to start MATLAB from a window manager
menu or Desktop icon.
-nodesktop-do Not start the MATLAB desktop. Use the current
Terminal for commands. The Java virtual machine
would be started.
-singlecompthread-limit MATLAB to a single computational thread.
By default, MATLAB makes use of the multithreading
capabilities of the computer on which it is running.
-nojvm-shut off all Java support by not starting the
Java virtual machine. In particular the MATLAB
Desktop won't be started.
-JDB [Port]-Enable remote Java Debugging on port (default 4444)
-R Matlab_command-start MATLAB and execute the Matlab_command.
-logfile log-make A copy of any output to the command window
in file log. This is includes all crash reports.
-ddebugger [Options]-Start debugger to debug MATLAB.
-nouserjavapath-ignore custom Javaclasspath.txt and javalibrarypath.txt files.

Running MATLAB at the command line, mainly uses a few red parameters above.

1. Direct operation of Matlab

$ matlab

Then you can run the Matlab script directly


2. Run m file

If the M file name is MATLABFILE.M

(1) Method one

After entering the directory where m files reside, run

$ matlab-nodesktop-nosplash-rmatlabfile

Matlabfile only with filename, cannot add. m

(2) Modify the. bashrc file

$ vim ~/.BASHRC

Add the following:

# Add an ' Mrun ' alias for running Matlab in the terminal.
Alias mrun= "Matlab-nodesktop-nosplash-logfile ' Date +%y_%m_%d-%h_%m_%s '. Log-r"

After saving, enter the directory where the. m file is located and run

$ Mrun Matlabfile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.