Why do I receive an error about the EDITOR environment variable when running MATLAB in nodisplay mode?
9 次查看(过去 30 天)
显示 更早的评论
Why do I receive an error about the EDITOR environment variable when running MATLAB in nodisplay mode?
When I run MATLAB in nodisplay mode and try to run the editor, I receive the following error:
Error: Environment variable EDITOR is not set.
??? Error using ==> system_dependent
Unknown service.
Error in ==> /devel/archive/R13/fcs/ship/unix/install/all/toolbox/matlab/general/edit.m (editor)
On line 249 ==> system_dependent('miedit', '');
Error in ==> /devel/archive/R13/fcs/ship/unix/install/all/toolbox/matlab/general/edit.m
On line 35 ==> errMessage = editor;
采纳的回答
MathWorks Support Team
2010-3-9
This is an intended behavior. To use the MATLAB Editor, you must run MATLAB with a display. You can do this by setting your DISPLAY environment variable or by starting MATLAB without the -nodisplay option.
Here are some instructions on how this could be done:
1) Start MATLAB from the Terminal Window in -nodisplay mode.
% matlab -nodisplay
2) Once MATLAB starts in the terminal use the SETENV and GETENV function to explore/change the environment variables.
3) To get the current variable value:
>> getenv EDITOR
4) To change it use the following:
>> setenv('EDITOR','emacs');
>> edit % this should launch the Emacs editor.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!