Home > PC Software > Associating MATLAB with *.mat files

Associating MATLAB with *.mat files

MATLAB uses the *.mat extension to save exported workspace data, and this is the most common use of the file format[1]. However, Microsoft Access uses the *.mat extension for shortcuts to Micorosoft Access tables, and changes settings in addition to the normal Windows file extension properties:

  1. File association cannot be changed under the Tools > Folder options menu
  2. File extension is hidden even when “Show extensions for known file types” is checked.

The easiest way I’ve found to fix this file extension association is to use the following MATLAB command in the command window:

commandwindow; cwd=pwd; cd([matlabroot ‘\toolbox\matlab\winfun\private’]); fileassoc(‘add’,’.mat’) ;cd(cwd); disp(‘Changed Windows file association. MAT-files are now associated with MATLAB.’)

This link from the Mathworks website has more information:
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f8-8880.html#bq4h655-1

Advertisements
Categories: PC Software
  1. November 1, 2011 at 5:46 am

    You could not be more precise.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: