Editing matlab script

I would like to edit matlab scripts in two cases

(1) In the Matlab command window running in linux terminal, how to create and edit a script file? use

edit(filename)

invokes an interactive editor that is not needed when working on the linux server.

(2) In emacs, is there any way to edit the matlab script conveniently? Which is better using MATLAB-Emacs or EmacsLink?

when I try to execute cvs checkout MATLAB-Emacs from http://sourceforge.net/scm/?type=cvs&group_id=154105 , which should indicate module_name?

Thank!


EDIT:

There is a problem when installing MATLAB-emacs. I thought my CEDET is installed here:

/usr/share/emacs22/site-lisp/cedet-common   
/usr/share/emacs22/site-lisp/cedet-contrib  

My CEDET has version 1: 1.0pre4-3 (intrepid) on Ubuntu. Therefore, I type the command:

$ make "LOADPATH=/usr/share/doc/cedet-common /usr/share/doc/cedet-contrib"    
 for loadpath in . /usr/share/doc/cedet-common /usr/share/doc/cedet-contrib; do \    
       echo "(add-to-list 'load-path \"$loadpath\")" >> autoloads-compile-script; \    
    done;    
 "emacs" -batch --no-site-file -l autoloads-compile-script -f cedet-batch-update-autoloads matlab-load.el .    
 Generatim autoloads for cedet-matlab.el...    
 Generatim autoloads for cedet-matlab.el...done    
 Generatim autoloads for matlab.el...    
 Generatim autoloads for matlab.el...done    
 Generatim autoloads for mlint.el...    
 Generatim autoloads for mlint.el...done    
 Generatim autoloads for semantic-matlab.el...    
 Generatim autoloads for semantic-matlab.el...done    
 Generatim autoloads for tlc.el...    
 Generatim autoloads for tlc.el...done    
 Generatim autoloads for semanticdb-matlab.el...    
 Generatim autoloads for semanticdb-matlab.el...done    
 Updatim header...    
 Updatim header...done    
 Wrote /home/tim/.emacs.d/matlab-emacs/matlab-load.el    
 make: *** No rule to make target `matlab-publish.el', needed by `lisp'.  Stop.    

What happened? Thank!

+2
3

, R2009a EmacsLink Matlab, , Matlab-Emacs - . EmacsLink Matlab, , Matlab-Emacs , , , EmacsLink.

Emacs Matlab, Emacs ( M-x). edit() , script Emacs. , , matlab- , :

http://blogs.mathworks.com/desktop/2009/09/14/matlab-emacs-integration-is-back/

CVS: modulename - "matlab-emacs". elisp.

EDIT: matlab-emacs; , . ( , , ). , matlab-emacs , CEDET.

CEDET http://cedet.sourceforge.net/ ( 1.0pre7) ~/.emacs.d/elisp/( ~/.emacs.d/elisp/cedet-1.0pre7/) CEDET make EMACS=/usr/bin/emacs ~/.emacs.d/elisp cvs:

cvs -z3 -d:pserver:anonymous@matlab-emacs.cvs.sourceforge.net:/cvsroot/matlab-emacs co -P matlab-emacs

matlab-emacs

make "LOADPATH=../cedet-1.0pre7/common ../cedet-1.0pre7/eieio ../cedet-1.0pre7/semantic/bovine/ ../cedet-1.0pre7/semantic/"

; : .emacs add

(setq load-path (cons "~/.emacs.d/elisp/matlab-emacs/" load-path))
(load-library "matlab-load")

matlab startup.m

addpath('~/.emacs.d/elisp/matlab-emacs/toolbox','-begin');
rehash;
emacsinit;

! emacs M-x matlab-shell. foo.m foo.m emacs, , ( M-x).

, , matlab ( ). , , dbstop in foo, foo, dbstop ( ), (Mx tool-bar-mode) , , , .. dbquit.

, Windows, Matlab-shell ( , - Mathematica, R, numpy...) - emacs/matlab ( matlab, emacslink).

+5

matlab-emacs http://matlab-emacs.sourceforge.net/ - Emacs, EmacsLink , MATLAB. matlab-emacs EmacsLink, MATLAB. "Modulename" - "matlab-emacs".

, Emacs MATLAB MATLAB, EmacsLink. :

http://blogs.mathworks.com/desktop/2009/09/14/matlab-emacs-integration-is-back/

, MATLAB "emacsclient", Emacs.

EDIT:

. , matlab-publish , .

Matlab-emacs CVS M . , MATLAB emacsclient . emacsinit.m MATLAB, MATLAB, .

emacsclient matlab-, , emacsclient . matlab-shell, ​​ MATLAB, emacsinit.

, , MATLAB . MATLAB , emacsclient -n.

+4

, matlab-publish.el , , ( , ) MATLAB script dl_emacs_support.m. , script company-matlab-shell.el, tarball CVS. , make, , .

, dl_emacs_support.m script CVS, , script MATLAB. dl_emacs_support.m .

, matlab-emacs tarball CVS . .

CEDET Note: I checked the CEDET source code and compiled it without sweat. If you use Ubuntu, I believe that before compiling matlab-emacs, the following packages should be installed in the repository: cedet-common , ede , eieio , semantic , speed . These packages are installed on /usr/share/emacs/site-lisp, so LOADPATH should be "/usr/share/emacs/site-lisp/cedet-common /usr/share/emacs/site-lisp/ede /usr/share/emacs/site-lisp/eieio /usr/share/emacs/site-lisp/semantic /usr/share/emacs/site-lisp/semantic/bovine".

0
source

All Articles