Thread Subject: Specifying behavior when double-clicking a file on the Current Directory window

Subject: Specifying behavior when double-clicking a file on the Current Directory window

From: Frederic Moisy

Date: 25 Aug, 2009 21:41:01

Message: 1 of 3

I would like to know if it exists a way to set Matlab's behavior
when I double-click on a file of a given type iin the "Current Directory"
window (in other word, to associate a file extension to some
behavior).

For instance, I have a m-file called "process.m" and some data
files called "mydata001.dat" in the current directory.
When I double-click on "mydata001.dat", Matlab recognizes the file
has the extension ".dat", so it launches "process" with the input argument
"mydata001.dat", i.e. it executes the command : process('mydata001.dat').
Is it possible?

Thanks!
Frederic

Subject: Specifying behavior when double-clicking a file on the Current Directory window

From: Steven Lord

Date: 25 Aug, 2009 21:58:02

Message: 2 of 3


"Frederic Moisy" <moisy.nospam@fast.u-psud.fr> wrote in message
news:h71lpd$g9s$1@fred.mathworks.com...
>I would like to know if it exists a way to set Matlab's behavior
> when I double-click on a file of a given type iin the "Current Directory"
> window (in other word, to associate a file extension to some
> behavior).
>
> For instance, I have a m-file called "process.m" and some data
> files called "mydata001.dat" in the current directory.
> When I double-click on "mydata001.dat", Matlab recognizes the file
> has the extension ".dat", so it launches "process" with the input argument
> "mydata001.dat", i.e. it executes the command : process('mydata001.dat').
> Is it possible?

Write a function named OPENDAT. See DOC OPEN for more information.

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f10-14803.html#brqy0p3-1

--
Steve Lord
slord@mathworks.com

Subject: Specifying behavior when double-clicking a file on the Current Directory window

From: Frederic Moisy

Date: 25 Aug, 2009 22:37:19

Message: 3 of 3

Excellent, thanks!
Frederic.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com