Why do I receive an error about the EDITOR environment variable when running MATLAB in nodisplay mode?

조회 수: 10 (최근 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
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개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by