フィルターのクリア

Edit file in existing Matlab from shell

3 ビュー (過去 30 日間)
Robin
Robin 2012 年 12 月 12 日
I was wondering if there might be a way to open a m-file for editing in an existing matlab session from the linux command line?
  2 件のコメント
Andreas Goser
Andreas Goser 2012 年 12 月 12 日
I am not an Linux expert, but still enough knowledgebale to ask why one wants to open the file in the MATLAB editor of an already open MATLAB session through another way than in MATLAB itself?
Daniel Shub
Daniel Shub 2012 年 12 月 12 日
Some projects I work on involve MATLAB only to a small extent. I could imagine wanting a shell script that would "switch" to one of these projects. Some of the things I might want to do is open some tex files, open some pdfs for reading, some vector graphics for editing, and some MATLAB files.

サインインしてコメントする。

回答 (1 件)

Daniel Shub
Daniel Shub 2012 年 12 月 12 日
The MATLAB editor is programmable from MATLAB (see Yair's blog). I think you would need to setup a socket to control MATLAB from the Linux CLI. The simplest might be to create a timer object in MATLAB that reads a file to see what files should be open in the editor. You could then echo filenames into that file from the Linux CLI. Or you could just use emacs.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by