Linux command
matlab 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start MATLAB
matlab
Start without GUI
matlab -nodesktop
Run script and exit
matlab -batch "[script_name]"
Run with specific startup file
matlab -r "[startup_commands]"
Start without splash screen
matlab -nosplash
Run script with arguments
matlab -batch "[myscript('[arg1]', '[arg2]')]"
Start with reduced memory
matlab -nojvm
Show version
matlab -help
说明
matlab launches MATLAB, a computing environment for numerical computation, visualization, and programming. It's widely used in engineering, science, and finance. The desktop provides an integrated environment with editor, command window, workspace, and figure windows. No-desktop mode offers command-line interaction for scripts and automation. Batch mode (-batch) executes commands and exits, suitable for automated workflows and scheduled jobs. It returns non-zero exit codes on errors, unlike -r which continues on errors. Scripts (.m files) contain MATLAB code. Functions define reusable operations. The MATLAB path determines which files are accessible. Without JVM (-nojvm), MATLAB uses less memory but loses desktop, figure windows, and some toolbox features. Useful for computation-only tasks on resource-limited systems.
参数
- -nodesktop
- Start without desktop GUI.
- -nodisplay
- Start without display (no figures).
- -nosplash
- Skip splash screen.
- -nojvm
- Start without Java (limited features).
- -batch _COMMAND_
- Run command/script and exit.
- -r _COMMAND_
- Run command on startup.
- -logfile _FILE_
- Copy output to log file.
- -sd _DIR_
- Set startup directory.
- -useStartupFolderPref
- Use preference for startup folder.
- -singleCompThread
- Limit to single thread.
- -help
- Show help and version.
FAQ
What is the matlab command used for?
matlab launches MATLAB, a computing environment for numerical computation, visualization, and programming. It's widely used in engineering, science, and finance. The desktop provides an integrated environment with editor, command window, workspace, and figure windows. No-desktop mode offers command-line interaction for scripts and automation. Batch mode (-batch) executes commands and exits, suitable for automated workflows and scheduled jobs. It returns non-zero exit codes on errors, unlike -r which continues on errors. Scripts (.m files) contain MATLAB code. Functions define reusable operations. The MATLAB path determines which files are accessible. Without JVM (-nojvm), MATLAB uses less memory but loses desktop, figure windows, and some toolbox features. Useful for computation-only tasks on resource-limited systems.
How do I run a basic matlab example?
Run `matlab` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -nodesktop do in matlab?
Start without desktop GUI.