How to associate .fig file in linux?

10 ビュー (過去 30 日間)
Paul
Paul 2012 年 2 月 27 日
編集済み: prateek raj gautam 2020 年 2 月 16 日
I am trying to associate .fig files with matlab in linux (Ubuntu 10.10), such that I can open them by double-clicking the file.
I'm able to open files from the command line with "matlab -r "open('filename.fig')"".
The closest I've been able to get with the "open with" configuration is to have matlab start, the figure pop up, and then matlab and the figure shutdown. This was with the file being associated with "matlab -r "open(%f)""
Any tips would be appreciated.
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 3 月 22 日
Please keep in mind that if you open() a .fig file by double-clicking, you cannot run its associated code. .fig files have associated .m files and you must run the .m file in order to do initialization needed by the .fig file.

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

採用された回答

Andreas
Andreas 2012 年 3 月 22 日
Hi Paul!
You are on the right track.
The right command for "open with" is matlab -desktop -r "open(%f)"
Cheers Andreas
  1 件のコメント
Paul
Paul 2012 年 3 月 23 日
Worked great, thanks!

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

その他の回答 (1 件)

prateek raj gautam
prateek raj gautam 2019 年 11 月 19 日
The right command for "open with" is matlab -desktop -r "open(%f)"
It worked after installing matlab-support from package manager.
but Each m file is opened in separate window. How to make it open is same running instance.
  1 件のコメント
prateek raj gautam
prateek raj gautam 2020 年 2 月 16 日
編集済み: prateek raj gautam 2020 年 2 月 16 日
matlab -desktop -r "open(%f)
after installing matlab-support and configuring it properly.
any update related to not opening each file in seprate matlab window?

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

カテゴリ

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