smilingbuddha
smilingbuddha

Reputation: 14660

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.

Upvotes: 1

Views: 2219

Answers (4)

Mark
Mark

Reputation: 1983

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

Upvotes: 0

ric0liva
ric0liva

Reputation: 311

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.

Upvotes: 1

Praetorian
Praetorian

Reputation: 109119

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

Upvotes: 2

zellus
zellus

Reputation: 9592

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

Upvotes: 1

Related Questions