double-clicking .mat file opens a new Matlab without loading the workspace in Win 7

2 次查看(过去 30 天)
Windows 7 Professional 64-bit Operating System Matlab version 7.12.0.635 (R2011a) 64-bit (win64) .mat files are associated with Microsoft Access
In Windows 7, I went to Control Panel -> Default Programs -> Associate a file type or protocol with a program, found .mat and changed the program to be MATLAB (in recommended programs). But, double-clicking a .mat file in windows explorer opens a new MATLAB window and does not even load the workspace.
I have also tried the “Run utility to associate files with .mat extension with MATLAB” link in help but got “??? Error using ==> fileassoc No permissions to modify the registry.”
How can I open import wizard after double-clicking .mat file in windows explorer, just like with older version/windows?

回答(5 个)

Desiree
Desiree 2011-8-8
You should check if you have administrator rights on your system. Furthermore in Windows 7 applications do not normally start with administrative privileges. One way to workaround this would be to either run MATLAB as administrator or turn UAC off. Then run fileassoc over the link in the documentation again.

RDV
RDV 2011-8-11
Try this: 1. In Control Panel, click on Default Programs- Set Associations, select .mat file. 2. In Open with window, give the path as 'Matlab\bin\win32\MATLAB.exe' and not 'Matlab\bin\matlab.exe' as given on matlab site. This worked for me, I am using windows Vista.

Thomas
Thomas 2011-11-3
I had the same problem and the following worked for me. (Windows 7 64-bit, R2009b)
  1. Enter in MATLAB: web([docroot,'/techdoc/matlab_env/f8-8880.html#bq4esi8'])
  2. In the Utility to Change File Associations, click on one of the "Run Utility..." options to change the file associations.
  3. If you receive the 'Error using ==> fileassoc No permissions to modify the registry.', do the following to turn of the UAC. Control Panel -> User Accounts -> Change User Account Control settings -> (choose lowest setting)

Jonathan Wang
Jonathan Wang 2012-12-20
run MATLAB as administrator, and then copy following command into your command window, and click "enter":
commandwindow; cwd=pwd; cd([matlabroot '\toolbox\matlab\winfun\private']); fileassoc('add','.mat') ;cd(cwd);

Wenwu
Wenwu 2014-7-18
I had the same question, Windows 7 Professional 32-bit, Matlab 2012b. I tried many methods but failed. However, when I looked into the regedit, I searched the .mat and found the subitem UserChoice was strange, so I deleted it, then it worked, you can try.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by