参考资料: mathwork关于matlab启动参数的介绍: http://www.mathworks.cn/help/techdoc/matlab_env/f8-4994.html SpecifyingMATLAB Startup Options Youcan specify startup options (also called command flags or commandline switches) that instruct the MATLAB program to perform certainoperations when you start it. On all platforms, you specify theoptions as arguments to the matlab command when you start is at theoperating system prompt. For example, the following starts MATLAB andsuppresses the display of the splash screen. matlab-nosplash OnWindows platforms, you can precede a startup option with either ahyphen (-) or a slash (/). For example, -nosplash and /nosplash areequivalent. Onall platforms, you can also specify startup options using a MATLABstartup file—see Specifying Startup Options in the MATLAB StartupFile OnWindows platforms, you can specify startup options in the MATLABshortcut—see Including Startup Options in a Shortcut on WindowsSystems. IncludingStartup Options in a Shortcut on Windows Systems Youcan add selected startup options (also called command flags orswitches for the command line) to the target path for your shortcutin the Windows environment for MATLAB. For more information about theoptions, see CommonlyUsed Startup Options. Touse startup options for the MATLAB shortcut icon in a Windowsenvironment, follow these steps:
Thisexample instructs MATLAB to automatically run the file results afterstartup, whereresults.m isin the startup folder or on the search path for MATLAB. The statementin the Target fieldmight appear as C:\Program Files\MATLAB\R2010b\bin\matlab.exe -r "results"Includethe statement in double quotation marks ("statement").Use only the file name, not the file extension or path name. Forexample, MATLAB produces an error when you run ... matlab.exe -r "D:\results.m"Usesemicolons or commas to separate multiple statements. This examplechanges the format to short,and then runs the MATLAB code file results: ... matlab.exe -r "format('short');results"Separatemultiple options with spaces. This example starts MATLAB withoutdisplaying the splash screen, and then runs the MATLAB codefile results: ... matlab.exe -nosplash -r "results" |
GMT+8, 2025-3-13 09:27 , Processed in 0.036210 second(s), 17 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.