开发者

Opening .m files DIRECTLY in MATLAB

I am using Ubuntu 10.04 and have MATLAB installed on my computer. I wanted to know if there was any way to open .m file directly in MATLAB without having 开发者_高级运维to go through the painful process of starting MATLAB, and navigating through folders to open up desired scripts.


Try changing file associations for .m files so that you can double click on them and have them open in the MATLAB editor.


A startup file for user-defined options may fit your needs. Or have a look at shortcuts by Mike.


To open an m-file from matlab w/o navigating through menus:

>>edit myfile 

The extension .m is assumed. This requires that myfile.m is in matlab's search path.

To add your favorite locations to matlab's search path, try

>>pathtool

and choose SAVE so the locations are preserved for your next Matlab session.


What worked for me is appending %F to the end of Exec=some/path which is in my matlab.desktop file.

Locate the matlab.desktop file its either in ~/.local/share/applications or ~/usr/share/applications.

Solution from here


Also if you don't have a matlab.desktop file then you may want to create one link to some relevant help to create launcher icon

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜